Skip to content

fix(header-dropdown): improve ARIA semantics for overlay dropdowns an…#2212

Draft
spike-rabbit wants to merge 2 commits into
mainfrom
fix/application-header/a11y
Draft

fix(header-dropdown): improve ARIA semantics for overlay dropdowns an…#2212
spike-rabbit wants to merge 2 commits into
mainfrom
fix/application-header/a11y

Conversation

@spike-rabbit

@spike-rabbit spike-rabbit commented Jun 23, 2026

Copy link
Copy Markdown
Member

…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:

Code Coverage

…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

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@spike-rabbit spike-rabbit force-pushed the fix/application-header/a11y branch 2 times, most recently from 2683a67 to 01abce2 Compare June 23, 2026 15:12
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
@spike-rabbit spike-rabbit force-pushed the fix/application-header/a11y branch from 01abce2 to 33bc148 Compare June 23, 2026 16:14
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.

Launchpad has ARIA-Expanded instead of ARIA-HasPopup.

1 participant