Start with the journey, not the Tab key

Keyboard access means more than being able to press Tab through a page. A visitor should be able to find content, understand where they are, operate controls, and finish a task without a pointer. That matters to people who cannot use a mouse, people who use alternative input devices that act like a keyboard, and anyone temporarily working without a trackpad.

Begin by listing a few important journeys: finding an article, searching the site, signing in, or submitting a form. Follow each journey with the keyboard alone. Can you reach every action? Does the order make sense? Can you tell which item will respond when you press a key? This task-based view catches problems that a quick check of the navigation menu may miss.

Build on controls that already know how to work

Use links for navigation and buttons for actions. Native HTML controls come with expected keyboard behavior: a link or button can receive focus, Enter activates a link, and Enter or Space activates a button. Form fields, checkboxes, and select controls also have familiar interaction patterns. A clickable span or div, by contrast, needs extra work to become discoverable and operable by keyboard.

Arrange the page so its underlying content order follows a logical reading and interaction sequence. Tab and Shift+Tab should move through interactive items in an order that matches what visitors see. Avoid positive tabindex values to force a custom order; they are difficult to maintain when content changes. If a page has a long repeated header, a skip link can give keyboard users a direct route to the main content. The link should become visible when it receives focus.

Make focus easy to see and hard to lose

Keyboard users need a clear sign of their current position. Give focused links, buttons, and fields a visible indicator that stands out against surrounding colors. A border, outline, or underline change can work; a subtle color shift alone may be easy to miss. Check the indicator against the actual backgrounds and states used across the site. Do not remove the browser’s default outline unless you provide an effective replacement.

Focus also needs to follow changes in the interface. Imagine a reader opening a dialog to subscribe to a newsletter. Focus should move into the dialog, remain within it while it is open, and return to the opening control when the reader closes it. If a form reports an error after submission, make the message noticeable and help the reader locate the field that needs attention. Moving focus can be useful, but unexpected jumps during ordinary typing are confusing.

Keep menus and forms predictable

A menu that opens only on hover may be invisible to someone using a keyboard. Its trigger should be reachable and operable without a pointer. Once open, visitors need a clear way to reach its options and close it. For a simple site navigation, ordinary links and a button that expands a group of links are often easier to manage than a complex custom menu. If you build a specialized widget, follow an established keyboard interaction pattern rather than inventing new key commands.

Forms deserve the same care. Provide visible labels, place instructions near the fields they describe, and make error messages specific enough to act on. Do not rely on placeholder text as the only label: it can disappear as soon as someone starts typing. Check that checkbox labels, help links, submit buttons, and any confirmation step are reachable in a sensible sequence. A form is not keyboard-accessible if its final action requires a mouse click.

Test the whole task, then test it again

A simple first test is to put the mouse aside. Reload the page, press Tab to enter it, use Shift+Tab to move back, and try Enter and Space on controls where appropriate. Use arrow keys in controls that normally support them. Watch for focus that disappears behind a sticky header, a popup that cannot be closed, or a link that looks focused but does nothing. Repeat the test at a narrow viewport, where navigation and controls may change.

For example, picture a community events page with a filter panel and registration form. A keyboard test might reveal that the filter opens correctly but its close icon cannot receive focus. Replacing that icon with a labeled button fixes more than the immediate click problem: it gives the control a predictable role and behavior. Retest after the change, including the route back to the event list. Keyboard access is not a one-time feature; it is a quality to preserve whenever layouts, content, or interactions change.

Back to category ↗