Skip to content

[Bug]: HTML markup accessibility issues with mobile navigation button #31380

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Sidnioulz opened this issue May 5, 2025 · 0 comments · May be fixed by #31401
Open

[Bug]: HTML markup accessibility issues with mobile navigation button #31380

Sidnioulz opened this issue May 5, 2025 · 0 comments · May be fixed by #31401

Comments

@Sidnioulz
Copy link
Member

Follow-up of #31076 and its associated PR #31250.

The current mobile navigation button HTML markup is insufficient. We would need

  • an aria-label instead of title
  • an aria-expanded and/or aria-controls markup to indicate the button opens a menu, with the accompanying changes to the menu's markup (e.g. listbox or dialog role, to be verified); or the new popover API could maybe be used (e.g. https://mdn.github.io/dom-examples/popover-api/nested-popovers/) The exact markup to use must be evidence-based (e.g. a11ysupport analysis, copying an APG, following guidelines from a reputable source or providing a screenreader outcome)
  • the keyboard focus order to be fixed and a focus trap to be installed on the menu

We should also probably change the current HTML markup, so that we have the nav element rendered in the DOM but invisible until focused / until the button is triggered. This would help with screenreader keyboard shortcuts that navigate through nav elements or HTML landmarks.

Some references used to write this review:

@Sidnioulz Sidnioulz changed the title A11y: HTML markup issues with mobile navigation button [Bug]: HTML markup accessibility issues with mobile navigation button May 5, 2025
@yatishgoel yatishgoel linked a pull request May 7, 2025 that will close this issue
8 tasks
@Sidnioulz Sidnioulz self-assigned this May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant