Skip to content

Agentic MenuItem: expose selection state and actions for indicator rows - #4407

Merged
Jason Morse (JasonVMo) merged 1 commit into
mainfrom
user/sriramas/menu-item-accessibility-fix
Oct 29, 2026
Merged

Jason Morse (JasonVMo) merged 1 commit into
mainfrom
user/sriramas/menu-item-accessibility-fix

Conversation

@srividyaramas

Copy link
Copy Markdown
Contributor

Why

Selectable agentic menu rows should expose both their current state and the action available to assistive technology. Checkbox-style and single-choice rows were not declaring all of the native selection actions needed by the Win32 accessibility interface.

What changed

Interactive indicator rows now expose checked state and a native toggle action. Single-choice rows also expose selected state and the native selection action. Ordinary command rows and headers do not gain indicator actions.

The app still owns selection. Caller action labels and unrelated actions are preserved, and the original event is forwarded without an extra press or an automatic state change. Existing menu and focus handlers are unchanged.

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

Testing

  • The full components-package unit suite passed: 575 tests and all eight existing snapshots, including 14 new regression cases.
  • Both new Win32 Storybook checks passed, along with the executed existing native semantics/state checks.
  • Package build, lint, formatting, story type-checking, and component contract checks passed.

Two existing input-dependent native cases were skipped. The disabled-action assertion checks rejection by the public driver; it does not force native dispatch to a disabled row. Other native hosts and complete keyboard/pointer behavior remain unverified.

These are local results from this product branch. CI against current main and cross-platform native results still need review. The separate Windows tooling repair landed upstream in #4400 and is not part of this change.

Declare resolved Toggle/Select actions and preserve caller-owned state, original events, labels and native roles. Add focused unit and Win32 native regressions.

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

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 (+275b) 205.68k (+275b)
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
@srividyaramas

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service rerun

@srividyaramas

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree company="Microsoft"

@JasonVMo
Jason Morse (JasonVMo) merged commit 6e1c063 into main Oct 29, 2026
18 checks passed
@JasonVMo
Jason Morse (JasonVMo) deleted the user/sriramas/menu-item-accessibility-fix branch October 29, 2026 19:25
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