Explore behaviors before defining the interface.
Quick guide for designers
Always consider the context of the application, even when the guidance follows a standard pattern. Interaction design documents intent. Behavior must be verified in the implementation.
When to use
Use to group navigation destinations or actions predictably.
What to design
Show items, submenus when present, expanded or collapsed states, and visible focus.
How it behaves
In ordinary navigation, Tab traverses links and buttons. In ARIA action menus, arrow navigation navigate items; Esc closes and returns focus to the trigger. Context menus also need keyboard and touch access.
What to document in Figma
Distinguish navigation, action menus, and context menus. Record the keyboard pattern, opening, closing, the action target, and focus after commands.
How to review
Check whether the purpose and states are clear on small and large screens and with zoom. Verify documented behavior in the implementation, including keyboard and screen reader use where applicable.
Full guidance
Interaction Design
Questions to ask when designing components of type Menu.
Important:
Depending on the context in which you build your components, there may be further questions, and some listed here may not be necessary. Assess each case individually.
Designing for "no interaction"
- Before interacting, can you tell that the menu contains navigation options?
- Is the current item or active section visually identifiable?
- Do items with submenus make clear that they open more options?
Designing for mouse use (any pointing device)
- Is there visual feedback when hovering over actionable items?
- Does clicking a link load the corresponding page or section?
- Does clicking a submenu trigger predictably open or close the submenu?
Designing for gesture use
- Does the menu open and close comfortably on small screens?
- Do items and triggers have sufficient touch areas?
- Does the mobile menu's visual order follow the navigation order?
Designing for keyboard use (any non-pointing device)
- Do menu links and buttons have visible focus?
TABmove through items in the expected order?ESCclose submenus or temporary menus when applicable?- Does focus return to the trigger when a temporary menu is closed?
Designing for screen reader use
- Does the navigation region have an accessible name when needed?
- Do links have clear, unique names within the context?
- Do submenus expose their open or closed state when applicable?
Editorial extension — interaction patterns and decisions
Magoo editorial adaptation: extends the previous guidance with design, documentation, and review decisions. References support the adaptation; these scenarios do not represent executed tests or certification.
Navigation, actions, and context
In ordinary site navigation, links lead to destinations and buttons show or hide groups of links. Preserve Tab and Shift + Tab navigation and identify the current page. A dropdown appearance does not require role="menu".
An action menu groups commands such as Edit or Duplicate. If adopting the ARIA menu pattern, document opening, initial focus, navigation with arrow navigation, activation, and exit. Do not apply the ordinary navigation rule of traversing every item with Tab to this pattern.
A context menu presents actions for an identified item. Provide an accessible button such as Actions for Monthly report in addition to any secondary click or long press. Document the keyboard shortcut when available and make the action target clear.
What to design and document
Show the trigger, expanded, collapsed, focus, unavailable items, and submenus when present. Separate the destination link from the group expansion button when both are needed. Do not rely only on hover or an unnamed icon.
In an ARIA action menu, Enter or Space on the button opens the menu and focuses the first item; arrow navigation navigate items. Esc closes it and returns focus to the trigger. Tab leaves the menu rather than traversing every item. Submenus also require documenting entry, exit, and return to the parent item.
After an action, direct focus according to the outcome: for example, to an opened dialog or a nearby control if the original item is removed. On small screens, retain all actions and keep the menu within the visible area.
Design and implementation review
In the design, check that destinations, commands, and context are recognizable. In the implementation, verify the chosen pattern, names, expansion state, focus sequence, and closing with keyboards, touch, and screen readers. Hidden controls must not remain in the focus sequence.
Scope: the basic methods below describe ordinary site navigation. For ARIA action menus and context menus, see the focus and keyboard differences in the editorial extension of the Interaction design tab.
Interaction Methods
Possible interaction methods for components of type Menu.
Important:
Only the main methods are listed here. Custom components require further study.
Mouse interaction (any pointing device)
- Clicking links navigates to the corresponding destination.
- Clicking submenu buttons toggles their display.
- Hover can reveal visual cues but should not be the only way to open.
Keyboard interaction (any non-pointing device)
TABnavigates menu links and buttons.ENTERactivates links and buttons.SPACEactivates opening buttons when present.ESCcloses temporary menus or submenus when applicable.
Keyboard (or gesture) interaction + screen reader
- Using screen reader landmark commands locates navigation by name.
- Traversing links with a screen reader identifies each destination and its grouping.
- Activating a submenu button opens or closes the group and makes its new state perceivable.
- In ordinary site navigation,
Tabtraverses links and buttons; in an ARIA action menu,arrow navigationtraverse items andEsccloses the menu.
Gherkin
BDD (Behavior-Driven Development) methodology focusing on three pillars: User Stories, Acceptance Criteria, and Gherkin Syntax (Given, When, Then).
Scenario: Given that I am on a page containing a navigation menu
Keyboard navigation
- WHEN I use the
Tabkey to move focus to the menu - I SEE visible focus on menu links and buttons
- THEN, when I activate a link with
Enter - I SEE the corresponding destination loaded
- THEN, when I activate a submenu button
- I SEE the submenu open or close
Screen reader on desktop
-
When I use a screen reader on a computer (NVDA, JAWS, VoiceOver) and navigate the component
- I HEAR that the menu belongs to a navigation region when applicable.
- I HEAR clear names for links and buttons.
- I HEAR the open or closed state on submenu triggers.
- THEN, when I interact with the component, when applicable
- I HEAR or perceive that the corresponding information, state, content, or action is available.
Screen reader on mobile devices
-
WHEN I use a screen reader on a phone (TalkBack, VoiceOver) and swipe to navigate the component, the following happens:
- I HEAR that the menu belongs to a navigation region when applicable.
- I HEAR clear names for links and buttons.
- I can open, navigate, and close the menu without improperly accessing hidden content.
- THEN, when I interact with the component, when applicable
- I HEAR or perceive that the corresponding information, state, content, or action is available.
Additional scenarios — editorial extension
Ordinary navigation: open a group
- GIVEN ordinary navigation with a collapsed group
- WHEN I activate its button using the keyboard
- THEN the expanded state is communicated and links become available in the
Tab.
Action menu: open, navigate, and cancel
- GIVEN an ARIA action menu button
- WHEN I open it with
EnterorSpace, navigate witharrow navigationand pressEsc - THEN the menu closes without executing an action and focus returns to the button.
Context menu without a secondary click
- GIVEN an item with contextual actions
- WHEN I use its action button with a keyboard or touch
- THEN I access the same actions and can identify the item they apply to.
Considerations
Considerations for components of type Menu.
- Website navigation menus should not automatically be treated as
role="menu"; that pattern is better suited to application menus. - Submenus opened only on hover exclude keyboard and touch users.
- Mobile menus should keep visual order and focus order consistent.
Implementation notes and behavior decisions
- Use
navfor navigation menus.
- Use lists when grouping links.
- Use
aria-expandedon submenu triggers.
- Avoid applying
role="menu"to ordinary website navigation.
References
Additional references for components of type Menu.
Important:
Most references are on the course platform alongside the lessons cited in this material.
Disclaimer:
The links listed here are a curated collection of references where you can find implemented components, rather than recommendations. There is no unified implementation format and no guarantee that these links follow every design pattern. Direct questions to the teams responsible for the linked materials. Before copying a model, remember that all materials are constantly updated and that patterns, particularly proprietary ones, may change.
Design patterns
- W3C APG: Disclosure Pattern open_in_new (external link, opens in a new tab)
- W3C APG: Menu Button Pattern open_in_new (external link, opens in a new tab)
- W3C APG: Menu and Menubar Pattern open_in_new (external link, opens in a new tab)
- MDN Web Docs: nav open_in_new (external link, opens in a new tab)
Design System
- US.gov - Header open_in_new (external link, opens in a new tab)
- US.gov - Side navigation open_in_new (external link, opens in a new tab)
- IBM Carbon - UI shell header open_in_new (external link, opens in a new tab)
- Adobe Spectrum - Menu open_in_new (external link, opens in a new tab)
- Bootstrap - Navbar open_in_new (external link, opens in a new tab)
- Bootstrap - Dropdowns open_in_new (external link, opens in a new tab)
Editorial extension references
W3C APG — Disclosure navigation (external link, opens in a new tab)
W3C APG — Menu button (external link, opens in a new tab)
W3C APG — Menu and menubar (external link, opens in a new tab)