Did you know that some people navigate websites and digital content without using a mouse?
People with mobility disabilities, people who are blind or have low vision, and others may rely on a keyboard or assistive technology that works like a keyboard to navigate and interact with digital content such as electronic documents, websites, and desktop and mobile software.
Section 508 requires federal agencies to ensure that the information and communication technology (ICT) they buy and use is operable without requiring a mouse or other pointing device. Keyboard access benefits everyone, including people who temporarily cannot use a mouse or simply prefer keyboard navigation.
Try It Yourself: Put Away Your Mouse
One of the easiest ways to identify keyboard accessibility problems is to try navigating the web without your mouse.
Open a webpage or web application and use these common keyboard commands:
- Tab — Move forward through interactive elements, such as links, buttons, and form fields.
- Shift + Tab — Move backward through those same interactive elements.
- Enter — Activate links, buttons, and other controls when appropriate.
- Spacebar — Activate certain buttons and controls, such as checkboxes.
- Arrow keys — Navigate within some controls, menus, radio button groups, and other components.
- Escape — Close or exit some menus, dialogs, and other components.
As you navigate, ask yourself:
- Can I reach every link, button, form field, and other interactive element?
- Can I tell which element currently has keyboard focus?
- Can I activate controls using the keyboard?
- Does the focus move in an order that makes sense?
- Can I move into and out of menus, dialogs, and other components without getting stuck?
If you answer no to any of these questions, you may have identified an accessibility issue.
Keyboard Focus Should Be Easy to Find
As you press the Tab key, look for a visible indicator showing which element currently has focus. This may appear as an outline, border, underline, or another visual change.
A visible focus indicator helps keyboard users understand where they are on the webpage and what will happen when they press Enter, Spacebar, or another key.
Avoid removing or hiding visible keyboard focus unless you replace it with another clear focus indicator.
Don’t Create a Keyboard Trap
Keyboard users must be able to move both into and out of online interactive content.
For example, if pressing Tab moves keyboard focus into a menu, dialog, video player, or other component, the user must also have a way to move focus out of that component using the keyboard.
When keyboard focus becomes stuck and the user cannot navigate away without using a mouse, it is known as a keyboard trap.
Key Takeaways
- Make all online content available using a keyboard.
- Maintain a logical keyboard navigation order.
- Make keyboard focus visually observable.
- Make sure users do not become trapped within a component.
- Test your web content without a mouse.
For more information on keyboard accessibility and keyboard testing, visit: WebAIM: Keyboard Accessibility.
