-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move button inside navigation region
Move the menu button inside the navigation region, so that it is discoverable by screen reader users even when the nav is closed: > Place mobile open/close buttons within the <nav> element and use them to toggle state of another child wrapper of the nav. This will ensure that the navigation landmark is still discoverable by screen readers, even if it is in a closed/hidden state. https://a11y-style-guide.com/style-guide/section-navigation.html#kssref-navigation-navigation-mobile > Where a lot of people go wrong is by placing the button outside the region. This would mean screen reader users who move to the <nav> using a shortcut would find it to be empty, which isn’t very helpful. https://inclusive-components.design/menus-menu-buttons/#placement > For instance, a navigation on small screen devices may initially contain only a single toggle button. But that toggle button would reveal additional links and other navigational elements, when activated. https://www.scottohara.me/blog/2018/03/03/landmarks.html#navigation This means we need to make the nav region always visible, so that the menu button is always visible (on mobile) – and therefore we need to revert some of the changes from 02ce19f: - toggling the visibility of the list rather than the nav - moving the aria-controls assocation back to the list, by moving the `navigation` id in the HTML
- Loading branch information
Showing
4 changed files
with
11 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters