Skip to content

Agentic ListboxItem: expose selection correctly to assistive technology - #4404

Merged
Jason Morse (JasonVMo) merged 4 commits into
mainfrom
user/sriramas/listbox-item-accessibility-fix
Oct 29, 2026
Merged

Jason Morse (JasonVMo) merged 4 commits into
mainfrom
user/sriramas/listbox-item-accessibility-fix

Conversation

@srividyaramas

@srividyaramas srividyaramas commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Why

A standalone agentic ListboxItem can look selected without declaring that selection in its accessibility state. This makes its state and available action harder for assistive technology to understand.

What changed

Standalone interactive items now declare their selected value as checked state and advertise the custom toggle action. Windows exposes the native checked projection. macOS retains the button role; the desktop driver does not expose checked queries for that role. Items managed by a containing list keep their list-item role and list-owned selection behavior. Section headers remain noninteractive.

The app remains responsible for updating selection. Accessibility actions are forwarded once, without an extra press or an automatic selection change. The tests also check that conflicting caller accessibility properties cannot override the component's actual state.

This change includes focused regression tests, updated component documentation, and patch changesets. Broader component coverage will come separately.

Testing

  • The full components-package unit suite passed: 567 tests and all eight existing snapshots, including six new regression cases.
  • All six selected Win32 component callbacks passed at the current head, covering portable roles/enabled state, Windows checked projection, and native actions. The full selected native run passed 174 checks with zero skips.
  • Package build, lint, formatting, story type-checking, and component contract checks passed.
  • A separate local validation branch combining the Button and ListboxItem changes with the previously validated Windows tooling repair passed 587 unit tests and the cache-cleared root aggregate: 175 tasks, zero failures.
  • macOS Fabric and Paper Storybook CI passed at this head. Each report includes three passing ListboxItem role/enabled-state callbacks and three explicitly skipped Windows-only cases; callback presence and skip reasons were verified in the native artifacts.

The macOS follow-up changes only Storybook tests and related contract documentation. Portable role and enabled/disabled assertions remain shared. Windows checked projection is a separate test, explicitly reported as unsupported on macOS rather than interpreted as false or counted as a pass.

The disabled-action check verifies that the public driver rejects activation without callbacks; it does not force an action through a disabled native provider. Keyboard, pointer, and wheel input were disabled. Native macOS and Windows Fabric are outside the local native qualification.

All PR checks on this head completed without failures as of October 28. The root aggregate cited above ran on the separate combined validation branch, not on this isolated product head. The Windows tooling repair landed upstream in #4400 and is not part of this PR. Green CI does not qualify macOS checked projection or the explicitly Windows-only action cases.

SriRamas23 and others added 2 commits October 27, 2026 11:22
Use supported checked state and the platform Toggle action while retaining the button role and external selection ownership. Own conflicting ARIA state/role aliases, preserve bound option semantics, and add focused public-state and real Win32 regressions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4b66f3ef-85ac-4405-bd35-dcc167a077b1
Observe the real Win32 Toggle action exactly once with both handlers present, unchanged externally owned selection and no synthesized press. Verify the supported disabled activation route rejects without callbacks. Keep the existing implementation unchanged and distinguish driver rejection from disabled-provider dispatch.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4b66f3ef-85ac-4405-bd35-dcc167a077b1
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Bundle size report

Tree-shaken, minified production esbuild bundles with React and React Native runtimes externalized.

Scenario Modules-Mac (Δ) Modules-Win (Δ) Size-Mac (Δ) Size-Win (Δ)
components-button 64 (+0) 65 (+0) 50.63k (+0b) 50.55k (+0b)
components-catalog 214 (+0) 215 (+0) 205.76k (+271b) 205.68k (+271b)
design-theme-state 34 (+0) 35 (+0) 30.15k (+0b) 30.08k (+0b)
design-themed-root 38 (+0) 39 (+0) 32.12k (+0b) 32.04k (+0b)
design-color-lib 6 (+0) 6 (+0) 6.33k (+0b) 6.33k (+0b)
design-theme-state-legacy-source 35 (+0) 36 (+0) 31.81k (+0b) 31.73k (+0b)
design-legacy-theme-from-flex 58 (+0) 59 (+0) 97.77k (+0b) 97.63k (+0b)

The job is advisory: size changes are reported but do not fail the pull request. Bundle or analysis errors still fail.


View bundle-size workflow run

@srividyaramas
srividyaramas marked this pull request as ready for review October 28, 2026 18:33
SriRamas23 and others added 2 commits October 28, 2026 12:34
Preserve portable button role and enabled-state assertions, qualify native checked reads on Windows, and document the macOS AXButton limitation without changing product behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 4b66f3ef-85ac-4405-bd35-dcc167a077b1
Keep the validated source unchanged and preserve append-only history.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4b66f3ef-85ac-4405-bd35-dcc167a077b1
@JasonVMo
Jason Morse (JasonVMo) merged commit cdea138 into main Oct 29, 2026
18 checks passed
@JasonVMo
Jason Morse (JasonVMo) deleted the user/sriramas/listbox-item-accessibility-fix branch October 29, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants