Repository navigation
fix(ResizeHandle): an unbounded region reports its measured basis as aria-valuemax - #7481
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report📚 Storybook Preview🧪 Sandbox PreviewNo new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Visual Regression44 of 448 shot(s) changed. A change here is a question, not a failure: check whether the after is the
and 24 more. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
There was a problem hiding this comment.
Exposing a maximum and a working End on unbounded resize handles is the right goal, but this needs changes because the reported maximum is not a limit the region actually respects.
- Arrow keys after End, or a default, saved, or pre-resize size larger than the window or container, leave
aria-valuenowabovearia-valuemax, and End then shrinks the region. - Without a container, End sizes the region to the full window regardless of where it starts, so in the Collapsible and ViewportPercentage stories the focused handle ends up outside the visible area.
- The vertical path reads
window.innerHeightduring render, so a server-rendered handle hydrates with a mismatch and keeps noaria-valuemax. - The changeset says every handle without
maxSizenow reports a maximum, but handles in a container with pixel-only bounds still report none.
Please keep the reported maximum at or above the current size, bound End by the space the handle can actually reach, read the window extent in a hydration-safe way, and add tests for these cases, including a real-browser End check in a padded layout.
[Automated review]
| // The released no-container basis is the window WIDTH on both axes; a | ||
| // vertical region's reported maximum reads the window height instead so | ||
| // End cannot overgrow the viewport (the clamp math is untouched). | ||
| _effectiveMaxPx: |
There was a problem hiding this comment.
This stand-in is announced as aria-valuemax and used as End's target, but the clamp still uses _maxSizePx (Infinity), so the size can pass it: End then an arrow key, a larger default or saved size, or a window narrowed after mount leave aria-valuenow above aria-valuemax, and End then shrinks the region. AST-010 FR5 requires these values to describe the same resolved geometry. Smallest fix: never report a stand-in below the current size (for example Math.max(standIn, size)).
| : direction === 'vertical' | ||
| ? typeof window === 'undefined' | ||
| ? undefined | ||
| : window.innerHeight |
There was a problem hiding this comment.
window.innerHeight is read during render: the server renders no aria-valuemax, the first client render does, and React reports an attribute mismatch it does not patch, so a server-rendered vertical handle keeps no maximum (AST-013 FR9). Reading it through useSyncExternalStore with a null server snapshot, like viewportBasis, avoids the mismatch.
| if (end != null && Number.isFinite(end)) { | ||
| resizable._onResizeStart(); | ||
| resizable._onResizeMove(resizable._maxSizePx - resizable._size); | ||
| resizable._onResizeMove(end - resizable._size); |
There was a problem hiding this comment.
With the window stand-in, End sets the region to the full window width regardless of where it starts: in the Collapsible story the focused handle lands at x=1297 in a 1280px viewport and the content pane disappears. When _size is above the stand-in, this delta is negative and End shrinks the region. Consider bounding the target by the space the handle can reach (reading its position once at keypress adds no observer).
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [fix] `ResizeHandle`: a handle whose region has no configured `maxSize` now reports `aria-valuemax` — the extent the region can fill (its container's content box, or the window's extent along its axis) — and End moves the divider there, so a screen reader hears a complete range and the keyboard can jump to the largest size. Resize clamping is unchanged. |
There was a problem hiding this comment.
Handles in a container with pixel-only bounds (and those whose only percentage is the default, once it resolves) still report no aria-valuemax, and the window extent is not what a region starting away from the edge can fill; please state the conditions.
There was a problem hiding this comment.
This still needs changes, although the round-2 work fixes the earlier problems: the reported maximum no longer drops below an expanded size, hydration is clean, and End no longer shrinks the pane. In the existing Collapsible and Viewport Percentage stories, End now moves the focused handle past the edge of its padded overflow: hidden frame, so the handle can no longer be seen or grabbed and the content pane disappears; the new fullscreen fixture has no clipping container, so its check passes anyway. Please bound End's growth by the nearest clipping ancestor as well as the viewport, and run the real-browser check on a padded, clipped LayoutPanel layout that asserts the handle is still hit-testable and the painted width matches aria-valuenow. Also, a collapsed pane whose window or container is smaller than minSize reports aria-valuemax below aria-valuemin (for example 375 vs 400); flooring the stand-in at the announced value (the resolved minimum while collapsed) fixes it.
[Automated review]
| const room = isHorizontal | ||
| ? paneOnLeftOrTop | ||
| ? window.innerWidth - rect.right | ||
| : rect.left | ||
| : paneOnLeftOrTop | ||
| ? window.innerHeight - rect.bottom | ||
| : rect.top; |
There was a problem hiding this comment.
Room is measured only to the viewport. In the padded Collapsible and Viewport Percentage stories, End puts the focused handle at x=1279–1280 while its overflow: hidden shell clips at 1248, so the handle can't be seen or grabbed and the content pane disappears. Bounding by the nearest ancestor whose overflow isn't visible as well (read once here, no observer) would keep it in view.
| ? resolvedMax | ||
| : measuredBasisForMax == null | ||
| ? undefined | ||
| : Math.max(measuredBasisForMax, isCollapsed ? 0 : size); |
There was a problem hiding this comment.
While collapsed this floors the stand-in at 0, but the handle announces Math.max(_size, _minSizePx). With a window (or observed container) smaller than minSize, a collapsed handle reports aria-valuemax 375 under aria-valuemin/aria-valuenow 400. Flooring at the announced value (isCollapsed ? resolvedMin : size) keeps the range valid.
| }}> | ||
| <div | ||
| id="padded-pane" | ||
| style={{width: region.size, background: '#eee', padding: 12}}> |
There was a problem hiding this comment.
This pane is a shrinkable flex item, so after End it paints 981px while aria-valuenow says 1103, and nothing clips between the handle and the viewport, so the check passes where the Collapsible story fails. A LayoutPanel inside a padded overflow: hidden shell would exercise the real case.
| if (box == null || viewport == null) { | ||
| throw new Error('the handle or the viewport has no box'); | ||
| } | ||
| expect(box.x + box.width).toBeLessThanOrEqual(viewport.width); |
There was a problem hiding this comment.
Consider also asserting that the handle is hit-testable after End (for example elementFromPoint at its centre) and that the pane's painted width equals aria-valuenow; the viewport check alone passes while the handle is clipped by its container.
There was a problem hiding this comment.
This needs one more change: the collapsed-pane floor is fixed and End now stops at clipping containers, but it still parks the divider under the container's border. reachableGrowth() measures each clipping ancestor's border box while overflow clips at the padding box, so in the new Clipped Panel End story (and the Collapsible and Viewport Percentage stories) the 1px divider ends up entirely under the frame's 1px border, and the new Chromium check fails at its hit-test assertion, which is why pr-a11y is red. Bounding growth by each ancestor's padding box instead (for example left + clientLeft through left + clientLeft + clientWidth, and likewise on the block axis) should fix it and turn the End evidence step green.
[Automated review]
| if (!clipsX && !clipsY) { | ||
| continue; | ||
| } | ||
| const box = ancestor.getBoundingClientRect(); |
There was a problem hiding this comment.
overflow clips at the padding box, not the border box, so this lets End park the handle on the ancestor's border. In the Clipped Panel End story the 1px divider lands at x=559–560 while the frame clips at 559, so elementFromPoint at its centre returns the frame and the new Chromium check fails (the same happens in the Collapsible and Viewport Percentage stories). Bounding by the padding box keeps it visible, and clientWidth/clientHeight also leave out a scrollbar; document.documentElement can be skipped, since the viewport bound already covers it:
const box = ancestor.getBoundingClientRect();
const left = box.left + ancestor.clientLeft;
const top = box.top + ancestor.clientTop;
const right = left + ancestor.clientWidth;
const bottom = top + ancestor.clientHeight;There was a problem hiding this comment.
This needs a few changes before it can merge: the aria-valuemax stand-in, hydration, and End for left-to-right inline handles look right, but three points remain.
- End still does nothing for an unbounded handle in the documented
position="overlay"placement inside a clipping panel, and right-to-left it pushes the grab zone out of a clipping frame; please start the clipping walk above an overlay handle's panel, measure the room from the far edge of the grab zone rather than the divider, and add overlay and RTL cases to the Chromium check. _effectiveMaxPxadds a field to the exportedResizablePropstype; please carry it through the module-private registry this branch already uses for collapse and expand.- The Enter changeset from #7479 announces
_collapse/_expandprops that do not exist.
Since this branch now contains all of #7479, please land that first or drop the merges, and update the description.
[Automated review]
| if (!el || typeof window === 'undefined') { | ||
| return 0; | ||
| } | ||
| const rect = el.getBoundingClientRect(); |
There was a problem hiding this comment.
This is the 1px divider's box, but the grab zone and grip sit on the divider's physical left by design (L78–91), which right-to-left is the side the pane grows toward. In the Clipped Panel End story under RTL, End stops with the divider at 721–722 against the clip edge at 721 and the 16px grab zone at 705.5–721.5, so only half a pixel of the zone (which carries the pointer handlers) stays inside and a hit test at its centre misses the separator. Measuring from the union of this box and the grab zone's box (for example el.firstElementChild) kept the whole zone inside in a local trial (RTL 501.5, LTR 515.5).
| bottom: window.innerHeight, | ||
| }; | ||
| for ( | ||
| let ancestor = el.parentElement; |
There was a problem hiding this comment.
For position="overlay" — documented for a parent with overflow: clip, and what SideNav uses — the first clipping ancestor is the panel being resized, whose edge moves with the pane, so room is 0 and End never moves an unbounded overlay handle: in Chromium the pane stays at 240 while aria-valuemax reports 1280. Starting the walk above that panel in overlay mode (for example at el.parentElement?.parentElement) fixed it in a local trial (240 → 1239, handle still inside the viewport); an overlay case in the Chromium spec would guard it.
| const borderBottom = parseFloat(style.borderBottomWidth) || 0; | ||
| if (clipsX) { | ||
| edge.left = Math.max(edge.left, box.left + borderLeft); | ||
| edge.right = Math.min(edge.right, box.right - borderRight); |
There was a problem hiding this comment.
Border box minus borders still includes a classic scrollbar on a scrolling ancestor, and the scrollbar gutter clips like a border. box.left + ancestor.clientLeft through + ancestor.clientWidth (and clientTop/clientHeight on the block axis) would exclude both.
| * | ||
| * Optional for the same reason as `_onResizeCancel`. | ||
| */ | ||
| _effectiveMaxPx?: number; |
There was a problem hiding this comment.
ResizableProps is exported from Resizable/index.ts and the package root, so this field is public API under architecture:public-component-api INV12 — the comment at L1168–1171 says the same about collapse/expand. Registering the stand-in in that module-private map (for example {collapse, expand, effectiveMaxPx}) keeps the released type unchanged.
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [fix] `ResizeHandle`: Enter and double-click on a collapsed pane restore it to the size it had before it collapsed, not to its minimum, and reopen it even when `minSize` is below `collapsedSize`. `useResizable`'s props gain optional `_collapse`/`_expand` so a handle can use the hook's own transitions; hand-built props without them keep the previous behavior. |
There was a problem hiding this comment.
There are no _collapse/_expand fields at this head — collapse/expand reach the handle through a module-private map — so this would announce public props that do not exist. Describing the behaviour alone is enough, for example: Enter and double-click on a collapsed pane restore it to the size it had before it collapsed, not to its minimum, and reopen it even when minSize is below collapsedSize.
fd29ccc to
91bc8aa
Compare
fd60541 to
3d97727
Compare
There was a problem hiding this comment.
This is close — the reported aria-valuemax, its no-new-observer scope and the carried Enter/double-click restore look right, and the tests and CI pass — but a few small changes are needed before it can merge.
- Add a server-render plus hydration test for an unbounded handle (no
maxSize, nocontainerRef) that asserts no hydration error and the expectedaria-valuemaxafterwards, since no current test catches the window-extent read regressing to a render-time read, which leaves the attribute missing after hydration. - Delete the leftover viewport comment above
getRTLMultiplierand drop “and End moves toward” from the stand-in comment inuseResizable.ts, since End only uses a configured maximum. - Reword the changeset (and the matching JSDoc) so it no longer calls the stand-in a basis the hook already clamps against: a pixel-only region is never clamped to the window, and a vertical region reports the window height while its percentage basis stays the width.
[Automated review]
| // one on the first client render, instead of a hydration mismatch. It takes | ||
| // no resize subscription: an unbounded pixel region observes nothing | ||
| // (component:Resizable Performance and resources). | ||
| const windowExtent = useSyncExternalStore( |
There was a problem hiding this comment.
This read is hydration-safe as written, but nothing guards it: with this store swapped for a direct render-time read, aria-valuemax stays missing after hydration while every test in ResizeHandle.test.tsx and useResizable.test.ts still passes. A renderToString + hydrateRoot test for an unbounded handle without containerRef (like the existing hydration test in useResizable.test.ts), asserting no hydration error and the expected aria-valuemax afterwards, would cover it.
| // How far the pane can still grow before the handle leaves the viewport: | ||
| // the distance from the handle's far edge (the side away from its pane) to | ||
| // the viewport edge in the direction the pane grows. Zero when unknown. |
There was a problem hiding this comment.
This describes viewport room that nothing here computes; getRTLMultiplier returns -1 or 1 for text direction (1 when there is no element). It looks left over from the earlier End approach — please delete it.
| // percentage bound stays pinned to the container size at grab time. | ||
| const onResizeCancel = releaseGestureBasis; | ||
|
|
||
| // The maximum a handle REPORTS and End moves toward. A configured maximum |
There was a problem hiding this comment.
End reads only _maxSizePx and ignores this stand-in (ResizeHandle.tsx L593–597), so “and End moves toward” no longer holds.
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [fix] `ResizeHandle`: a separator whose region sets no `maxSize` now reports `aria-valuemax` — the basis the hook already measures and clamps against (the window extent on the region's axis, or the container's content box while a percentage bound observes it), never below the current size or, while collapsed, the minimum. Pixel-only regions inside a container still report no maximum (measuring one would add an observer). `ResizableProps` is unchanged; End still moves only to a configured maximum. |
There was a problem hiding this comment.
Without containerRef a pixel-only region is never clamped to the window, and a vertical region's percentage basis stays the window width while this reports its height (as useResizable.ts L1092–1093 says). Something like “reports a maximum — the window's extent on the region's axis, or the container's content box while a percentage bound observes it” would be accurate; the JSDoc at useResizable.ts L1168–1171 has the same wording.
3d97727 to
51933b9
Compare
There was a problem hiding this comment.
Nearly there: the reported aria-valuemax, its no-new-observer scope and the new tests look right, and CI passes, but three small changes are needed before this can merge.
- Add a server-render plus hydration test for an unbounded handle without
containerRef(for examplerenderToStringthenhydrateRoot, like the existing hydration test inuseResizable.test.ts) that asserts no hydration error and the expectedaria-valuemaxafterwards, because no current test fails if the window read regresses to a render-time read, which leaves the attribute missing after hydration. - Delete the leftover viewport comment above
getRTLMultiplierand drop “and End moves toward” from the stand-in comment inuseResizable.ts, since End only uses a configured maximum. - Reword the changeset and the matching JSDoc so they describe a reported maximum rather than “the basis the hook already measures and clamps against”, since an unbounded region is never clamped to it and a vertical region reports the window height while its percentage basis stays the width.
[Automated review]
…aria-valuemax ARIA requires aria-valuemax on a focusable separator. Without a configured maxSize the handle now reports the basis the hook already measures and clamps against — the window extent on the region's axis (height for a vertical region, not the released width-on-both-axes basis), or the container's content box while a percentage bound observes it — floored at the current size and, while collapsed, at the resolved minimum so it never falls below aria-valuemin. Pixel-only regions inside a container stay unreported: measuring them would add an observer to an atomic pixel path (component:Resizable Performance). The value reaches the handle through a module-private registry (getEffectiveMaxPx), so ResizableProps is unchanged. End still moves only to a configured maximum; End for an unbounded region stays a recorded gap for a later change.
51933b9 to
2dba242
Compare
There was a problem hiding this comment.
This looks ready to merge: a ResizeHandle whose region has no maxSize now exposes an aria-valuemax that never falls below the announced value, server-rendered handles hydrate cleanly, and bounded handles, End, rendering and the exported types are unchanged. The new tests catch the missing maximum without the fix and cover hydration, the vertical axis, the collapsed floor and the container case, and in Chromium the affected stories report the expected maximum with pixel-identical rendering. Nothing further is needed here; pixel-only regions inside a container and End for unbounded handles remain the recorded follow-ups.
[Automated review]
…ntrols (#7473) ## Problem A screen-reader user on SideNav's resize handle heard a separator with a name and value but no relationship to what it resizes. APG Window Splitter requires the separator to reference its primary pane with `aria-controls`; `component:Resizable` AR1 (Window Splitter adoption under `spec:AST-020` FR15, #7464) names this as the implementation gap it closes. ## Fix `ResizeHandle` already passes `aria-controls` through (`{...props}`, ResizeHandle.tsx L670; `BaseProps` carries the ARIA attributes), and SideNav is the one shipped composition in the repository that renders both a pane and a ResizeHandle (LayoutPanel documents the pairing but renders no handle; Table's column `ResizeHandle` is a different local component). SideNav now gives its `<nav>` an id — a consumer's `id` wins, otherwise `useId()` — and passes `aria-controls={navId}` to the handle. No visual or behavioural change. ## Evidence - `SideNav.test.tsx`: "names the nav it resizes with aria-controls" and "keeps a consumer's nav id and points the handle at it". Red arm: both fail with `SideNav.tsx` reverted to main; 204/204 with the fix. tsc, eslint (hook order kept), Prettier clean. ## Changeset `@astryxdesign/core` patch `[fix]`. ## Not done here Enter reopening a collapsed pane at its minimum rather than its previous size is recorded in the Resizable record as a gap only: restoring the previous size is optional in the pattern. ## Record Code-only by the maintainers' ruling: the Resizable trio (#7479 → #7481 → #7473) merges without record edits, and one Resizable record PR then deletes or narrows all three AR1 gaps together.
… fixed on main (#7481), so its row goes; one known failure remains (a plain arrow on a collapsed pane)
…trols fixes (#7510) ## Record change `component:Resizable` (draft) AR1 and its decision entry catch up with the three fixes now on `main` — #7479 (Enter and double-click restore the previous size, and reopen below the collapse threshold), #7481 (an unbounded Handle reports a measured stand-in as `aria-valuemax`), #7473 (SideNav passes `aria-controls`) — so record and code say the same thing. - Deleted: the two Enter gaps (reopen at the minimum; no reopen below `collapsedSize`). - Added before the gaps: "An unbounded Handle reports a measured stand-in as `aria-valuemax`: the window's extent along its axis when no container is supplied, or its container's content box while a percentage bound observes it, never below its current size or, while collapsed, its minimum." - Gaps now: "the Handle names the pane it resizes with `aria-controls` only when its caller passes one (SideNav does); an unbounded Handle in a container that no percentage bound observes carries no `aria-valuemax`, because measuring that container would add an observer to a region whose bounds are all in pixels (Performance and resources); End does not move an unbounded Handle; and a plain arrow cannot reopen a collapsed pane whose `collapsedSize` (40 px by default) is larger than one 10 px step." The last gap is the Window Splitter binding's `bare-start-collapsed` known failure (#7485); its fix follows this record. - DEC: the gap list matches. - AR1 verification row: adds the fix tests, all verified on `main` — `ResizeHandle.test.tsx` "restores the previous size, not the minimum, when Enter reopens a collapsed pane", "reopens on Enter even when the minimum size sits below the collapse threshold", "reports the window basis as aria-valuemax when no maximum is configured; End leaves an unbounded region alone", "reports the container basis as aria-valuemax while a percentage bound already observes it", "never reports aria-valuemax below aria-valuemin while collapsed in a small window", "reports no aria-valuemax for an unbounded pixel-only region in a container, which stays unobserved"; `SideNav.test.tsx` "names the nav it resizes with aria-controls (APG window splitter)"; `aria-controls` leaves the pending-contract clause. ## Full pass against `main` Every AR1 claim re-read against `ResizeHandle.tsx`/`useResizable.ts` on `main`: role/name/orientation/value properties, `aria-valuetext` while collapsed, `aria-disabled`, arrow directions and RTL mirroring, Shift step, Home/End, Enter collapse/restore (now true), the stand-in maximum (true per #7481), and each remaining gap (true: `aria-controls` is caller-supplied; pixel-only-in-container reports none; End uses only a configured maximum; a plain arrow on a collapsed pane stays at the minimum — reproduced in jsdom). Existing verification titles re-checked. Frontmatter, FR1–FR6, ORD and OQ1 unchanged. ## Writing rubric results R1 narration: none; AR1 and the decision stay present tense (the two fixed gaps are deleted, not rephrased as history). R2 research: none in the record. R3 evidence: the verification cell cites test titles and the pending contract, not pull requests. R4 rejected alternatives: none added. R5 change references: none. R6 open questions: unchanged — OQ1 (Handle `direction` target-state reflection) keeps its question.
## What this proves `component:Resizable` AR1 (the Window Splitter adoption recorded in #7464 under `spec:AST-020` FR15) now has an executable contract and a binding. A keyboard or screen-reader user on a resize handle gets: a named separator that states its position and bounds, says which axis it lies along, names the pane it resizes, moves by a step with the arrows (the inline arrows following the reading direction under RTL, and flipping with `isReversed`), collapses and restores the pane with Enter, jumps to the bounds with Home/End, and — when disabled — is exposed `aria-disabled` and does not move (its Tab-order removal is the component's own test, outside this contract). Test-only: no runtime, docs, or Changeset. Enforcement follows `spec:AST-020` FR9: APG-required parts are `required`; Home/End (optional in APG) are `advisory` (End is compared against the `aria-valuemax` the separator exposes, or the minimum Home reached when none is exposed) until AR1 is current. ## Expectations (AST-020 FR13) | Expectation | Sources | Layer | Enforcement | | --- | --- | --- | --- | | `windowsplitter.separator.role-and-name` | WCAG 4.1.2, APG Window Splitter, APG Window Splitter | accessibility-tree | required | | `windowsplitter.separator.position-and-minimum` | WCAG 4.1.2, APG Window Splitter | dom | required | | `windowsplitter.separator.maximum` | WCAG 4.1.2, APG Window Splitter | dom | required | | `windowsplitter.separator.orientation` | WCAG 4.1.2, APG Window Splitter | dom | required | | `windowsplitter.separator.controls-pane` | WCAG 1.3.1, APG Window Splitter | dom | required | | `windowsplitter.keys.arrows-move` | WCAG 2.1.1, APG Window Splitter | real-browser | required | | `windowsplitter.keys.enter-collapses-and-restores` | WCAG 2.1.1, APG Window Splitter | real-browser | required | | `windowsplitter.keys.home-end` | WCAG 2.1.1, APG Window Splitter | real-browser | advisory | | `windowsplitter.separator.unavailable-keeps-position` | WCAG 4.1.2, APG Window Splitter | real-browser | required | Exemptions: `1.1.1-non-text-content` → the binding component; `1.3.1-info-and-relationships` → the binding component and composing page (remainder only); `1.3.2-meaningful-sequence` → the binding component and composing page; `1.3.5-identify-input-purpose` → the binding component; `1.4.1-use-of-color` → the binding component and theme; `1.4.3-contrast-minimum` → the binding component and theme; `1.4.11-non-text-contrast` → the binding component and theme; `2.1.1-keyboard` → the composing page (remainder only); `2.1.2-no-keyboard-trap` → the binding component and composing page; `2.4.2-page-titled` → the page; `2.4.3-focus-order` → the composing page; `2.4.4-link-purpose` → the binding component; `2.4.6-headings-and-labels` → the binding component and caller content (remainder only); `2.4.7-focus-visible` → the binding component and theme; `2.4.11-focus-not-obscured` → the composing page; `2.5.2-pointer-cancellation` → the binding component; `2.5.3-label-in-name` → the binding component; `2.5.8-target-size` → the binding component and theme; `3.1.1-language-of-page` → the page; `3.2.2-on-input` → the caller and composing page; `3.2.4-consistent-identification` → the composing page; `3.3.1-error-identification` → the binding component and composing page; `3.3.2-labels-or-instructions` → the binding component and composing page; `4.1.2-name-role-value` → the binding component (remainder only); `4.1.3-status-messages` → the caller and the assistive-technology verification record, spec:AST-009; `apg-interaction` → the binding component's record (remainder only); `forced-colors` → the binding component and theme; `reduced-motion` → the binding component and theme; `at-facing-strings` → the binding component and caller content ## Known failures (exact records, reconciled in both lanes) | Binding / state | Expectation | Exact failure | User impact | Authority / fix | | --- | --- | --- | --- | --- | | `ResizeHandle` / `bare-unbounded-in-container` | `windowsplitter.separator.maximum` | `the splitter exposes no aria-valuemax` | A screen-reader user on a pixel-only region inside a container with no maximum hears no maximum. | `component:Resizable` AR1's recorded gap (measuring the container would add an observer to an all-pixel region — Performance and resources); closes only with a record decision. | | `ResizeHandle` / `bare-snapped` | `windowsplitter.keys.arrows-move` | `ArrowRight (grow) left aria-valuenow at 200, not 210` | A keyboard user on a region with snap points presses an arrow and nothing happens: a 10 px step snaps back to its starting point. | `component:Resizable` AR1 (arrows move the splitter); moving to the adjacent snap point is a component decision for its own spec-backed patch. | | `ResizeHandle` / `bare-documented-usage` | `windowsplitter.separator.controls-pane` | `the splitter carries no aria-controls` | A screen-reader user on a handle rendered the documented minimal way hears a separator with no named pane. | `component:Resizable` AR1's recorded gap (the Handle names the pane it resizes with `aria-controls` only when its caller passes one; SideNav does); a component decision for its own spec-backed patch. | ## Shape - `internal/a11y-spec/src/patterns/window-splitter.ts` — `WINDOW_SPLITTER_PATTERN`, 9 expectations with WCAG and APG sources (APG Window Splitter wording verified against the published pattern on 2026-10-13); every other checklist dimension exempted to a named owner. - `window-splitter.fixtures.ts` — HTML splitter between two panes whose `<script>` implements the keyboard model; every expectation has a violating twin (`WINDOW_SPLITTER_MUTATIONS`). - `window-splitter.jsdom.test.ts` (36 cases) and `window-splitter.chromium.spec.ts`. - No harness change: `Home`/`End`/`PageUp`/`PageDown` are already on `main`. - `packages/core/src/Resizable/__tests__/ResizeHandle.a11y.{states,renders,known-failures,test}.tsx` and `ResizeHandle.a11y.chromium.spec.ts` — twelve states: bare horizontal, bare vertical (ArrowDown grows), reversed (ArrowLeft grows), RTL (ArrowLeft grows), collapsible, collapsible with `minSize` 20 below `collapsedSize` 50 (Enter reopens it since #7479), a pane that starts collapsed (`defaultIsCollapsed`; announces the minimum; the grow arrow opens it since #7512, and the collapse-and-restore row, which assumes an open pane, does not apply), unbounded (window stand-in since #7481), unbounded pixel-only with a `containerRef` — the first `useResizable` example — which reports no maximum (exact known failure backed by the record's gap), snapped (`snaps` [100, 200, 300, 400]; a 10 px arrow step snaps back, recorded as an exact known failure on the arrows row), the documented minimal usage with no `aria-controls` passed (exact known failure on the pane-relationship row, backed by the record's gap), disabled. SideNav is excluded (`sidenav-binding`): it hides its handle while collapsed, so it binds separately with states shaped for that.- `apps/storybook/stories/WindowSplitterA11y.stories.tsx` — one `no-visual` story per state through `renderResizeHandleState`. - `.github/workflows/ci.yml` — "Run Window Splitter accessibility contract" step; scope decided through `pr-scope-touches.sh` from the base; runs when Resizable, the harness, the stories, or the contract change (SideNav is not watched: it is excluded from this binding). - README row and index export. ## Source lines behind the binding facts `role="separator"`, `aria-orientation` = `vertical` for a horizontal layout (ResizeHandle.tsx L693–694), `aria-valuemax` from a configured maximum or the reported stand-in (window extent, or the container's content box while a percentage bound observes it; a pixel-only region in a container reports none), `aria-valuetext` "Collapsed" while collapsed (L698), `tabIndex` −1 and `aria-disabled` when disabled (L700), props spread accepts `aria-controls` (L730); keys: ArrowRight/Down `+step·rtl·sign`, ArrowLeft/Up the inverse (`KEYBOARD_STEP` 10 at L58, `getRTLMultiplier` L450; the shared arrow branch from L563 opens a collapsed pane on the grow arrow since #7512), Home to min, End only to a configured maximum (L606–623); Enter and double-click collapse and restore through the hook's own transitions (`toggleCollapse` L375; #7479 on `main`). The three known failures are `bare-unbounded-in-container` (no `aria-valuemax` for a pixel-only region in a container; the record's owned gap), `bare-snapped` (an arrow step snaps back; fix in flight) and `bare-documented-usage` (no `aria-controls` unless the caller passes one; the record's owned gap). ## Ownership exclusions `RESIZE_HANDLE_EXCLUSIONS`: SideNav binding (hides its handle while collapsed; binds separately); pointer drag model (pointer capture, foreign-pointer moves ignored, pointercancel/lost-capture ending, double-click collapse and restore, grab-zone geometry — proven by `ResizeHandle.test.tsx`'s jsdom pointer suites; ResizeHandle has no Escape cancel and no Chromium pointer suite); F6 pane cycling (optional, not adopted). ## Retained local tests (AST-021 FR6, FR14) `ResizeHandle.test.tsx` keeps its role, value-property and keyboard assertions. Removal blocker: `component:Resizable` is `draft` and its AR1 verification row cites these titles (including the Enter-restore and aria-valuemax tests the merged fixes added); the duplicates come out with the record pass that makes the record current, once this binding is on `main` and cited instead. ## Evidence - Vitest Resizable directory green (incl. 16 binding cases, known failures matched); pattern jsdom self-test 36/36; tsc (core, a11y-spec, storybook), eslint, Prettier, use-client, visual-workflow-owner clean. - Real Chromium: the CI step on this PR runs the fixture self-test (conforming pass, every mutation fails) and the twelve binding states, reconciling the three known failures exactly (the two Enter-restore rows were emptied when #7479 landed and the unbounded `aria-valuemax` row when #7481 landed).
What changes for users
A screen-reader user on a
ResizeHandlewhose region sets nomaxSizehears a maximum instead of an open-ended range: the separator reportsaria-valuemaxas the basis the hook already measures and clamps against — the window extent on the region's axis (height for a vertical region: the released no-container basis is the window width on both axes, so a vertical region used to announce the wrong extent), or the container's content box while a percentage bound already observes it. It never falls below the current size (a pane larger than the window reports itself as the maximum) nor, while collapsed, belowaria-valuemin.Scope, per the maintainers' 2026-10-13 ruling (option B, no new observation): pixel-only regions inside a container still report no maximum — measuring one would add an observer to an atomic pixel path (
component:ResizablePerformance). End movement for an unbounded region is not in this PR: End still moves only to a configured maximum, and the record keeps that gap for a later change.Shape
useResizable.ts: computes the stand-in (windowExtentviauseSyncExternalStore, hydration-safe; measured container basis when observed; floors at size / resolved min while collapsed) and registers it in a module-privateWeakMapkeyed by the returned props object.getEffectiveMaxPx(this module only; not re-exported) hands it to the handle.ResizablePropsis exactly as released (architecture:knowledge-contractsINV11).ResizeHandle.tsx:aria-valuemax= configured max, else the registered stand-in; End unchanged frommain.Tests (red on #7479's head, green here)
ResizeHandle.test.tsx: "reports the window basis as aria-valuemax when no maximum is configured; End leaves an unbounded region alone", "never reports a maximum below the current size, and End does not shrink the region", "never reports aria-valuemax below aria-valuemin while collapsed in a small window", "reports the window height, not the width, for an unbounded vertical region", "reports the container basis as aria-valuemax while a percentage bound already observes it", plus the pixel-only-in-container case stays unreported.Record
Code-only by the maintainers' ruling for the Resizable trio (#7479 → #7481 → #7473); the combined Resizable record PR that follows narrows the
aria-valuemax/End gap to "pixel-only regions in a container report no maximum; End does not move an unbounded Handle".