Keyboard Accessibility & Focus Management

Design Systems & Engineering • UX & Product Architecture

Keyboard accessibility lets people navigate and operate an interface through a keyboard interface. Focus management determines which element receives keyboard input as people move through the page, open a dialog, or return to their task.

What should you test?

Check What to look for
Keyboard operation and exit (2.1.1 and 2.1.2, A) Reach and use controls without a mouse. Follow the expected keys for each widget. Make sure users can leave any component they enter.
Focus order (2.4.3, A) When navigating sequentially, focus follows an order that preserves meaning and operation. Start from a logical document order.
Visible focus (2.4.7, AA) The user can see which control currently has keyboard focus. Check default and custom focus styles.
Focus not obscured Under WCAG 2.2 criterion 2.4.11 (AA), content created by the site must leave at least part of the focused component visible. Test sticky headers, bottom bars, and overlays while tabbing.

Example: A booking-change dialog

  1. Tab to the Change booking button and activate it. Focus moves inside the modal to a sensible starting point, such as the heading for a long dialog or the safer action for a hard-to-reverse change.
  2. Use Tab and Shift+Tab to move between controls. Sequential focus stays inside the open modal. Check that the dialog’s sticky footer does not cover focused controls in the scrolling content.
  3. Press Escape or use the visible close control. Focus normally returns to Change booking. If the trigger no longer exists or the user’s action leads to a different logical location, move focus to an appropriate element in that flow.

A modal can keep focus inside while it is open and still provide a keyboard way out. The modal pattern depends on a working exit and sensible focus placement after closing.

Where should teams start?

Use native buttons and links for common actions and navigation. For a custom widget, confirm its expected keyboard interaction and test it in context. Check focus return in the product as well as the component preview. In the product, the trigger might disappear when the booking changes.

Sources