Skip to content

♿️(frontend) fix menu semantics and trigger ARIA for screen readers#210

Open
Ovgodd wants to merge 1 commit into
mainfrom
fix/a11y-dropdownmenu-menu-role-and-trigger-aria
Open

♿️(frontend) fix menu semantics and trigger ARIA for screen readers#210
Ovgodd wants to merge 1 commit into
mainfrom
fix/a11y-dropdownmenu-menu-role-and-trigger-aria

Conversation

@Ovgodd
Copy link
Copy Markdown
Collaborator

@Ovgodd Ovgodd commented Apr 30, 2026

Purpose

Improve DropdownMenu accessibility semantics for screen readers:

  • announce a menu button state correctly on the trigger (collapsed/expanded)
  • avoid incorrect dialog announcement when opening a menu popup

Main problem for the Dialog issue comes from React Aria

Proposal

  • Inject trigger ARIA attributes (aria-haspopup="menu", aria-expanded, aria-controls) on the actual interactive child, including when wrapped in layout elements.
  • Keep the trigger wrapper non-interactive (no button-in-button pattern).
  • Link trigger and menu with proper ids (aria-labelledby / aria-controls).
  • Add a local Popover workaround to remove role="dialog" in menu usage, so SRs announce menu semantics instead of dialog semantics.

@Ovgodd Ovgodd requested a review from PanchoutNathan April 30, 2026 08:43
@Ovgodd Ovgodd self-assigned this Apr 30, 2026
@Ovgodd Ovgodd added the Accessibility Accessibility Update label Apr 30, 2026
@Ovgodd Ovgodd marked this pull request as draft April 30, 2026 08:44
@Ovgodd Ovgodd force-pushed the fix/a11y-dropdownmenu-menu-role-and-trigger-aria branch 2 times, most recently from db32b34 to b0eb7f8 Compare April 30, 2026 08:50
@Ovgodd Ovgodd marked this pull request as ready for review April 30, 2026 08:50
@Ovgodd Ovgodd force-pushed the fix/a11y-dropdownmenu-menu-role-and-trigger-aria branch 2 times, most recently from 48c7ed7 to b0df051 Compare April 30, 2026 09:02
Dropdown menu exposes proper ARIA, Popover no longer announces as dialog
@Ovgodd Ovgodd force-pushed the fix/a11y-dropdownmenu-menu-role-and-trigger-aria branch from b0df051 to 5a76b81 Compare May 5, 2026 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Accessibility Accessibility Update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant