fix(header-dropdown): improve ARIA semantics for overlay dropdowns an…#2212
fix(header-dropdown): improve ARIA semantics for overlay dropdowns an…#2212spike-rabbit wants to merge 2 commits into
Conversation
…mode Overlay (desktop) dropdown triggers now expose aria-haspopup="dialog" to correctly signal that they open a dialog rather than a menu. Inline (mobile) triggers omit the attribute because the content is rendered as a plain disclosure group. The dropdown panel role is switched dynamically between "dialog" (overlay) and "group" (inline) to match the actual interaction model perceived by assistive technologies. Closes #2153
There was a problem hiding this comment.
Code Review
This pull request improves the accessibility of the header dropdown component by dynamically setting ARIA attributes (such as aria-haspopup and role) depending on whether the dropdown is rendered inline or as an overlay, and adding aria-pressed to checked dropdown items. The feedback highlights an ARIA validity issue where aria-pressed is applied to an anchor element without a button role, and suggests dynamically setting role="button" when the item is checkable.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
2683a67 to
01abce2
Compare
Dropdown items that carry a checked state (e.g. language or theme selection) now expose aria-pressed so that the selected state is communicated to screen readers. Closes #2153
01abce2 to
33bc148
Compare
…d checked items
Overlay (desktop) dropdown triggers now expose aria-haspopup="dialog" to correctly signal that they open a dialog rather than a menu. Inline (mobile) triggers omit the attribute because the content is rendered as a plain disclosure group.
The dropdown panel role is switched dynamically between "dialog" (overlay) and "group" (inline) to match the actual interaction model perceived by assistive technologies.
Dropdown items that carry a checked state (e.g. language or theme selection) now expose aria-pressed so that the selected state is communicated to screen readers.
Closes #2153
Documentation.
Examples.
Dashboards Demo.
Playwright report.
Coverage Reports: