Skip to content

fix(ResizeHandle): Enter and double-click restore a collapsed pane to its previous size - #7479

Merged
cixzhang merged 9 commits into
mainfrom
fix/resizehandle-enter-restores
Oct 14, 2026
Merged

cixzhang merged 9 commits into
mainfrom
fix/resizehandle-enter-restores

Conversation

@cixzhang

@cixzhang cixzhang commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Problem

A keyboard user who collapsed a resizable pane with Enter (or a double-click) and pressed Enter again got the pane back at its minimum size, not the size they had — and when minSize sat below collapsedSize the pane never reopened at all (the emulated resize to the minimum fell under the collapse threshold, useResizable.ts L980–988). APG Window Splitter's Enter "restores the splitter to its previous position"; component:Resizable AR1 (#7464) records both as implementation gaps.

Fix

  • useResizable already has collapse() and expand() — expand restores the retained size (L926–933). Its props now carry them as optional - ResizeHandle's Enter and double-click call toggleCollapse(resizable): the hook's own transition when present, else the previous resize-to-minimum gesture.

No visual or pointer-drag change.

API reach of _collapse / _expand

ResizableProps is exported from @astryxdesign/core (it is the type a consumer passes between useResizable().props and a ResizeHandle), so these fields are reachable the same way _onResizeCancel, _direction and _isResizableProps already are: underscore-prefixed, optional, not listed in any props table or doc page, and intended as the hook→handle channel only. There is no narrower channel between the hook's props object and the handle, so the field is unavoidable for this fix; nothing in the public docs changes and no caller is expected to author them.

Evidence

  • ResizeHandle.test.tsx: "restores the previous size, not the minimum, when Enter reopens a collapsed pane" (300 → collapsed → 300) and "reopens on Enter even when the minimum size sits below the collapse threshold" (minSize: 20, collapsedSize: 50). The existing "removes aria-valuetext when the panel is expanded" now expects the restored 200 instead of the minimum 100 — that line was the old behaviour. Red arm: all three fail with ResizeHandle.tsx/useResizable.ts reverted to main; Resizable + SideNav suites 349/349 with the fix.
  • tsc, eslint, Prettier clean.

Changeset

@astryxdesign/core patch [fix]. Independent of #7473 (aria-controls); both follow #7464.

Tests

Enter and double-click each have two red-armed regressions in 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", "restores the previous size, not the minimum, when a double-click reopens a collapsed pane", "reopens on a double-click even when the minimum size sits below the collapse threshold" (all four fail on main's hook/handle).

Hook ↔ handle channel

ResizableProps is exactly as released (architecture:knowledge-contracts INV11: a field on an exported type, optional or underscored, is a public delta). useResizable registers its collapse/expand pair in a module-private WeakMap keyed by the props object it returns; getCollapseControls in useResizable.ts — not re-exported by the Resizable barrel or the package — hands it to ResizeHandle, whose toggleCollapse falls back to the resize gesture for a hand-built props object.

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.

… its previous size

APG Window Splitter's Enter restores the splitter to its previous position
(component:Resizable AR1 implementation gap). The handle emulated the
toggle with a resize to the minimum, so a reopened pane lost its size and a
pane whose minimum sits below its collapse threshold never reopened. The
hook's props now carry optional _collapse/_expand (the hook's own
transitions, which keep the size); the handle uses them and falls back to
the old gesture for hand-built props. Red-armed tests.
@vercel

vercel Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Oct 14, 2026 1:09am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 13, 2026
@astracat-bot

astracat-bot Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Oct 14, 2026, 1:27 AM UTC

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR

🧪 Sandbox Preview

View Sandbox for this PR

No new or modified components detected.

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@astryxdesign/core N/A 4.9KB 1.2KB

Accessibility Audit

Status: No accessibility violations detected.

Visual Regression

44 of 448 shot(s) changed.

A change here is a question, not a failure: check whether the after is the
picture you intended. Record that review on the PR. Baseline maintenance is an
explicit dispatch of CI; this report never rewrites the baseline or adds a release gate.

component story theme mode pixels
Selector Indicator Space Bottom Sheet Narrow End RTL neutral light 754,077
Selector Indicator Space Bottom Sheet Wide Start neutral light 740,188
Chat Full AI Chat probe light 238,081
Chat Full AI Chat probe dark 237,048
Markdown Default probe light 159,625
Markdown Default probe dark 158,986
Collapsible Dividers probe dark 66,445
Collapsible Dividers probe light 66,445
Chat Default neutral dark 33,205
Chat Default neutral light 32,876
Chat Empty State probe light 23,531
Chat Empty State probe dark 22,622
ChatAutoScroll Scroll Behavior Comparison neutral dark 15,378
ChatAutoScroll Scroll Behavior Comparison neutral light 14,107
Chat With Attachments probe light 13,406
Chat With Attachments probe dark 11,232
ProgressBar With Target Mark probe dark 7,895
ProgressBar With Target Mark probe light 7,895
TableRowExpansion Detail Panel neutral dark 5,150
TableRowExpansion Detail Panel neutral light 4,068

and 24 more.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix does what it describes, and its tests show the old behaviour failing and the new behaviour passing, but approval needs a maintainer decision first. The Enter and double-click restore is meant to follow component:Resizable AR1, which is still in #7464 and not on main yet, and that record does not cover the two optional members this PR adds to the exported ResizableProps type (_collapse, _expand), so a maintainer needs to land or approve AR1 as the governing spec and confirm those members. Separately, please move toggleCollapse above the ResizeHandle doc comment in ResizeHandle.tsx: where it sits now, the component loses its JSDoc description and usage example in editor hovers and in the emitted type declarations.

[Automated review]

* the minimum, which also cannot reopen a pane whose minimum sits below its
* collapse threshold.
*/
function toggleCollapse(resizable: ResizableProps): void {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This helper and its comment now sit between ResizeHandle's JSDoc block (L363–377) and export function ResizeHandle, so TypeScript no longer attaches that JSDoc to the component: editor hovers and the emitted ResizeHandle.d.ts lose its description and usage example. Moving toggleCollapse above L363, for example right after ResizeHandleProps, restores it.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix is ready from a spec and correctness standpoint. Enter and double-click on a collapsed pane now restore its previous size, which is the APG Window Splitter Enter behaviour that spec:AST-020 FR15 adopts for a focusable separator, and the new tests fail on the old code and pass here. Hand-built ResizableProps objects without the new optional _collapse/_expand members still compile and behave as before, and ResizeHandle's doc comment is attached to the component again. One coordination point: #7464 still lists these two behaviours as open gaps in its proposed Resizable record, so whichever of the two pull requests lands second should remove them.

[Automated review]

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Enter fix is correct: a collapsed pane now reopens at its previous size, which is the APG Window Splitter Enter behaviour that spec:AST-020 FR15 adopts for this separator, and the new Enter tests fail on the old code and pass here. Before this can be approved, please add a regression test for the double-click half of the fix in ResizeHandle.test.tsx (for example 300 → collapsed → 300, plus the minSize: 20 / collapsedSize: 50 reopen), because reverting only handleDoubleClick to the old gesture still passes the existing ResizeHandle, useResizable and SideNav tests. Separately, the draft component:Resizable record on main still lists both behaviours as open gaps, so the planned follow-up record change should remove them.

[Automated review]

resizable._isCollapsed ? resizable._minSizePx : -resizable._size,
);
resizable._onResizeEnd();
toggleCollapse(resizable);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing protects this call: with handleDoubleClick reverted to the old resize gesture, the existing ResizeHandle, useResizable and SideNav tests still pass, while a double-click round trip reopens at the minimum (or not at all when minSize < collapsedSize). Please add a double-click case next to the new Enter tests in ResizeHandle.test.tsx, for example 300 → collapsed → 300.

…private registry, not ResizableProps

ResizableProps is exactly as released. useResizable registers its
collapse/expand pair in a WeakMap keyed by the props object it returns;
getCollapseControls (useResizable.ts only; not re-exported by the Resizable
barrel or the package) hands it to the handle, which falls back to the
resize gesture for a hand-built object.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix itself is ready: Enter and double-click now reopen a collapsed pane at its previous size, including when minSize is below collapsedSize, which matches the APG Window Splitter behaviour adopted for this separator, and each new test fails without the fix. One change is needed before approval: the Changeset still says useResizable's props gain optional _collapse/_expand, but this version leaves ResizableProps unchanged, so please reword that sentence so the release note describes what ships. Separately, the draft Resizable record on main still lists both behaviours as open gaps, so the planned record follow-up should remove them.

[Automated review]

'@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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence describes an earlier version of the change: here ResizableProps gains no _collapse/_expand members, and the handle reaches the hook's collapse and expand through an internal registry, so the release note would announce public members that do not exist. Suggested wording for the second sentence:

Props from `useResizable` use the hook's own collapse and expand; a hand-built `ResizableProps` object keeps the previous resize-to-minimum toggle.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix itself is ready: Enter and double-click now reopen a collapsed pane at its previous size, including when minSize is below collapsedSize, which matches the APG Window Splitter behaviour adopted for this separator, and each new test fails without the fix. One change is needed before approval: the reworded Changeset no longer ends with its @cixzhang contributor line, so pnpm check:changesets and the Lint job fail; please add that line back after the summary sentence. Separately, the draft Resizable record on main still lists both behaviours as open gaps, so the planned record follow-up should remove them.

[Automated review]

'@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`. The handle uses `useResizable`'s own collapse and expand transitions; `ResizableProps` is unchanged, and a hand-built props object keeps the previous resize-to-minimum behavior.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pnpm check:changesets fails on this file ("body must credit at least one contributor, e.g. "@yourhandle" on its own line"), and the Lint job fails at that step. The rewording dropped the @cixzhang line this file previously ended with; adding it back after this sentence fixes it:

@cixzhang

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix is ready to approve: Enter and double-click on a collapsed pane now restore its previous size, including when minSize is below collapsedSize, which matches the APG Window Splitter Enter behaviour adopted for this separator, and each new test fails without the fix. The Changeset now credits its contributor and its check passes, so nothing else is required in this pull request. Optionally, align the description's "Fix" and "API reach of _collapse / _expand" sections with the code, since this version adds no members to ResizableProps. Separately, the draft Resizable record still lists both behaviours as open gaps, so the planned record follow-up should remove them.

[Automated review]

@cixzhang
cixzhang merged commit 458a74c into main Oct 14, 2026
56 checks passed
cixzhang added a commit that referenced this pull request Oct 14, 2026
…7479), so their rows go; the unbounded aria-valuemax row stays until #7481 lands
cixzhang added a commit that referenced this pull request Oct 14, 2026
…aria-valuemax (#7481)

## What changes for users

A screen-reader user on a `ResizeHandle` whose region sets no `maxSize` hears a maximum instead of an open-ended range: the separator reports `aria-valuemax` as 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, below `aria-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:Resizable` Performance). **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 (`windowExtent` via `useSyncExternalStore`, hydration-safe; measured container basis when observed; floors at size / resolved min while collapsed) and registers it in a module-private `WeakMap` keyed by the returned props object. `getEffectiveMaxPx` (this module only; not re-exported) hands it to the handle. `ResizableProps` is exactly as released (`architecture:knowledge-contracts` INV11).
- `ResizeHandle.tsx`: `aria-valuemax` = configured max, else the registered stand-in; End unchanged from `main`.
- One commit on top of #7479 (no merge commits); merges after it.

## 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".
cixzhang added a commit that referenced this pull request Oct 14, 2026
…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.
cixzhang added a commit that referenced this pull request Oct 14, 2026
…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.
@github-actions
github-actions Bot deleted the fix/resizehandle-enter-restores branch October 14, 2026 06:22
cixzhang added a commit that referenced this pull request Oct 14, 2026
## 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).

This branch was successfully deployed

1 active deployment
Preview — caa47d47 Deployed Oct 14, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant