Skip to content

Agentic MenuButton: use visible content as the accessible name - #4405

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

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

Conversation

@srividyaramas

Copy link
Copy Markdown
Contributor

Why

An agentic MenuButton should have a useful accessible name when its visible label is a number or plain text supplied through the content slot. The existing fallback handled string labels, but did not cover these other supported content forms consistently.

What changed

MenuButton now derives the native trigger name from string, numeric, or plain content-slot text when the app has not provided a name. Explicit accessibility names and label references continue to take precedence.

This is a naming correction, not a change to menu opening, selection, or focus behavior. It 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: 572 tests and all eight existing snapshots, including 11 new naming regression cases.
  • Both new Win32 Storybook naming checks passed.
  • Package build, lint, formatting, story type-checking, and component contract checks passed.

Four existing input-dependent native cases were skipped in the input-disabled run. This does not establish keyboard/pointer coverage or native qualification on other hosts.

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.

Project plain string, numeric and content-slot labels onto the actual native trigger, without overriding explicit accessibility names or references. Preserve menu-label derivation and cover caller renaming, native semantics and naming precedence.

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.73k (+242b) 205.65k (+242b)
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

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