Menus and navigation
Keep destinations separate from actions, with predictable keyboard and responsive behaviour.
Change a notebook’s status
Field notes
Reading status To read
View markup
<div class="spec-stack"><h3>Field notes</h3><p class="spec-muted">
Reading status <strong data-reading-state>To read</strong></p>
<div class="spec-actions"><button type="button" class="ex-button ex-button--spectral ex-menu-trigger"
id="spec-menu-trigger">Notebook actions <span class="ex-icon ex-icon--chevron-down" aria-hidden="true"></span></button></div>
<div class="ex-menu" id="spec-menu" hidden><button class="ex-menu-item" type="button" role="menuitem" tabindex="-1" data-ex-menu-action="reading">Mark as reading</button><button class="ex-menu-item" type="button" role="menuitem" tabindex="-1" data-ex-menu-action="finished">Mark as finished</button><button class="ex-menu-item" type="button" role="menuitem" tabindex="-1" data-ex-menu-action="reset">Move to To read</button></div>
<p class="spec-status" role="status" data-status></p></div>Usage and implementation
Explain unavailable actions
An aria-disabled menu action can remain discoverable with its reason during arrow navigation. Guard pointer and keyboard activation. A native disabled item is excluded from traversal by the helper. Do not rely on styling to prevent an action.
Destinations and responsive navigation
Use a nav landmark, links and aria-current="page" for the active destination. Breadcrumbs explain hierarchy. Compact navigation is a disclosure with an accessible expanded state; ordinary links retain normal keyboard and browser behaviour.
Content-led breakpoints must be checked at intermediate widths. Labels wrap before clipping; a mobile layout must retain all important destinations.
Manual tabs
Tabs switch related panels within a page. In the manual model, arrow keys move focus and Enter/Space activates the focused tab. Keep one selected panel, matching tab/panel relationships, and a visible distinction beyond colour.
Use page links when destinations need independent URLs or a different navigation hierarchy.
Verify the complete path
- Keyboard can open, traverse, activate and escape menus without losing focus.
- Long labels stay within the viewport, including RTL and enlarged text.
- Disabled items cannot activate through a direct event.
- Direct links, refresh, browser Back and current-location semantics stay useful.
- Unmounting a component removes listeners and restores managed attributes.
