keyboard navigation
Using a page entirely with the keyboard: Tab to move between controls, Enter and Space to activate, arrow keys inside widgets, Escape to close.
In more detail
Many people cannot use a mouse, and screen reader users rely on the keyboard. Each widget pattern has an expected key map, for example arrows in menus and tabs, Home and End to jump to the first and last item.
Related terms
- tab order — The sequence in which elements receive focus when the user presses Tab (forward) or Shift+Tab (backward).
- roving tabindex — A technique where only the active item in a group has tabindex="0" and the rest have tabindex="-1", so the group is one tab stop and arrow keys move between items.
- focus trap — Code that keeps keyboard focus inside a container, such as an open modal, wrapping from the last element back to the first.
- ARIA Authoring Practices Guide — The W3C guide that shows, pattern by pattern, which roles, states and keyboard behaviour accessible widgets should have.
- keyboard focus — The single element on the page that currently receives keyboard input, such as the text box you are typing into.
- keydown event — The browser event fired when a key is pressed, whose key property names the key, such as "Escape" or "ArrowDown".
Taught in
- Headless Architecture: State vs Presentation Separation — Design Systems & Component Engineering
- Focus Management: Trapping, Restoration & Focus Rings — Design Systems & Component Engineering
- Navigation & Disclosure: Dropdown Menus, Tabs & Accordions — Design Systems & Component Engineering
- Keyboard Navigation Protocols: Roving Tabindex & Virtual Focus — Design Systems & Component Engineering
- Creating Event Listener Hooks with Clean Teardown Logic — React 19 & Modern Component Architecture
- Virtualization: Rendering Infinite Datasets Efficiently — React 19 & Modern Component Architecture
- Accessible Headless Primitives: ARIA, Focus, And Keyboard — React 19 & Modern Component Architecture