Navigation (primary)
On this page
Implementation
- If a primary navigation does not use the native
<details>
/<summary>
elements, ensurearia-expanded
is applied to the menu trigger element and respects its state - If an item in the menu is an icon, ensure the icon has an accessible name
Keyboard interactions
All elements of the primary navigation can be navigated with a keyboard.
Primary and utility menus can also be expanded or collapsed using the keyboard.
Key | Result |
---|---|
Tab |
|
Shift + Tab |
|
Enter/Return/Space |
|
Enter/Return |
|
Escape |
|
Focus order
A logical focus order helps keyboard users operate our websites. Elements need to receive focus in an order that preserves meaning, therefore the focus order should make sense and not jump around randomly.
Focus will move from the menu trigger element to the first interactive element inside of a menu when expanded.
Touch targets
The large menu trigger element and spacing around links make them easy to select.
ARIA Authoring Practices Guide (APG)
Learn to use the accessibility semantics defined by the Accessible Rich Internet Application (ARIA) specification to create accessible web experiences.
Web Content Accessibility Guidelines
Understanding documents provide detailed explanations for Web Content Accessibility Guidelines (WCAG) guidelines and success criteria.
- SC 2.1.1 Keyboard (Level A)
- SC 2.1.3 Keyboard (no exception) (Level AAA)
- SC 2.4.3 Focus order (Level A)
- SC 2.5.5 Target size (Level AAA)
Other libraries
To learn more about our other libraries, visit this page.
Feedback
To give feedback about anything on this page, contact us.