Skip to content
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

Accessibility: add aria-expanded attribute to menu button(s) #54

Open
adamjohnson opened this issue Dec 7, 2020 · 0 comments
Open

Accessibility: add aria-expanded attribute to menu button(s) #54

adamjohnson opened this issue Dec 7, 2020 · 0 comments

Comments

@adamjohnson
Copy link

Request:

Priority navigation should add aria-expanded to the <button> tag(s)—for both "More" and the breakpoint mobile menu:

What is aria-expanded?

aria-expanded indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.

W3 aria-expanded spec

Current markup:

<button aria-controls="menu" class="nav__dropdown-toggle priority-nav__dropdown-toggle priority-nav-is-visible" prioritynav-count="2">more</button>

Proposed markup:

<button aria-expanded="false" aria-controls="menu" class="nav__dropdown-toggle priority-nav__dropdown-toggle priority-nav-is-visible" prioritynav-count="2">more</button>

aria-expanded is a boolean attribute. When the menu is open, it should toggle to true.

Here's a demo that shows aria-expanded in action in a similar context.

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

No branches or pull requests

1 participant