Skip to content

fix(fab): expose expanded state on the FAB.Menu trigger - #5151

Open
Ganeshguru5 wants to merge 3 commits into
callstack:mainfrom
Ganeshguru5:fix/fab-menu-trigger-aria-expanded
Open

Ganeshguru5 wants to merge 3 commits into
callstack:mainfrom
Ganeshguru5:fix/fab-menu-trigger-aria-expanded

Conversation

@Ganeshguru5

@Ganeshguru5 Ganeshguru5 commented Nov 1, 2026 •

Copy link
Copy Markdown

Motivation

The FAB.Menu trigger opens and closes the menu but never exposes whether it is open, so screen readers announce a plain "button". Shell already forwards aria-expanded; Menu just wasn't passing it.

Related issue

No existing issue. Same kind of fix as #5148 for Button. #5110 also edits Menu.tsx, so I can rebase after it.

Screenshots / Videos

Web: aria-expanded was absent; it's now "false" when closed and "true" when open.

TalkBack and VoiceOver before/after clips: to be added.

Test plan

  1. Run the example app, open Floating Action Button and select type menu.
  2. Inspect the trigger: it's collapsed.
  3. Press it: it's expanded. Press again: collapsed.

Checked on web only so far.

🤖 Generated with Claude Code

The trigger FAB toggles the menu but never set aria-expanded, so
assistive technology announced it as a plain button with no open or
closed state. Forward `expanded` to Shell, which already passes
aria-expanded through to the interactive control.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Found potential problems with the pull request:

  • Screenshot or video evidence is missing. Make sure to include one if it affects the UI.

@MikitasK MikitasK left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

good job 👍

could we just attach short before/after TalkBack + VoiceOver clips of the trigger? nothing else shows this state - Android exposes it as "expand/collapse" action, iOS only says "expanded" when open

Ganeshguru5 and others added 2 commits November 2, 2026 21:51
Without onPress the closed trigger renders disabled, so the collapsed
check ran against a disabled control.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

2 participants