Keyboard Navigation & Focus
Learn how keyboard users navigate the web, how tab order works, and how to build skip links and visible focus indicators.
Why keyboard navigation matters
Not everyone uses a mouse. People with motor disabilities, repetitive strain injuries, or vision impairments often navigate entirely by keyboard. Some use specialized devices like switch controls, sip-and-puff devices, or eye-tracking systems that all ultimately translate to keyboard-like interactions. Even power users frequently prefer keyboard shortcuts — try watching a developer work and you will see them reach for the keyboard far more than the mouse.
Every interactive element on your page must be reachable and operable by keyboard alone. If a user cannot tab to a button, activate a link, or fill out a form without a mouse, your site has a critical accessibility barrier.
The basic keyboard navigation model works like this:
- Tab moves focus forward to the next interactive element (links, buttons, form inputs).
- Shift + Tab moves focus backward to the previous interactive element.
- Enter activates links and buttons.
- Space activates buttons, toggles checkboxes, and opens select dropdowns.
- Arrow keys navigate within groups — radio buttons, select options, tabs, menu items.
- Escape closes modals, dropdowns, and tooltips.
Try it right now: press Tab on this page and watch the focus move between interactive elements. Notice the visual indicator (usually a blue or black outline) that shows which element has focus. That indicator is essential — without it, keyboard users have no idea where they are on the page.
WCAG Success Criterion 2.1.1 (Keyboard) requires that all functionality is operable through a keyboard interface. This is a Level A requirement — the most basic level. If even one interactive element on your page cannot be reached or activated by keyboard, you fail this criterion.
Quick accessibility test you can do right now: unplug your mouse (or on a laptop, do not touch the trackpad) and try to complete a task on your website using only the keyboard. Can you navigate to every link and button? Can you fill out every form? Can you always see where the focus is? If you get stuck anywhere, keyboard users will too.