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

Remove ‘aria-hidden’ attribute from main menu #1563

Conversation

mattcoy-arcticleaf
Copy link
Contributor

What?

Currently, the aria-hidden attribute is being added to the main menu (id="menu") with a value of true. This breaks screen-reader capabilities as it hides the entire menu from the accessibility tree.

Additionally, this attribute is unneeded and redundant in this instance because the menu is being hidden with CSS (display: none). This also goes against MDN best practices for the attribute (see link below). Having the menu hidden with CSS is sufficient for hiding it from the accessibility tree.

This Pull Request removes the code that toggles the aria-hidden attribute on the menu (and sets it to true on page load).

Tickets / Documentation

Screenshots

Current code for menu element on page load

current

Updated code for menu element on page load

updated

Copy link
Contributor

@bookernath bookernath left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!

@bigbot
Copy link

bigbot commented Aug 15, 2019

Autotagging @bigcommerce/storefront-team @davidchin

@bookernath bookernath merged commit be7e86a into bigcommerce:master Aug 15, 2019
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.

None yet

3 participants