We'd like to set Google Analytics cookies to learn how people use the Knowledge Base, so we can improve it. We set them only if you accept.

Skip to main content
Digital Accessibility Knowledge Base

keyboard-accessible

Web validation

All interactive elements must be operable using a keyboard alone.

Users must be able to reach and operate every interactive component with the keyboard alone, without a mouse, touchscreen, or voice command. This helps people with mobility disabilities who rely on switch devices, voice recognition, or other assistive technology to navigate independently. It also helps power users who prefer the keyboard. Links, buttons, menus, and form inputs should be reachable with the Tab key. Custom widgets should add keyboard interactions that mirror the behavior of native controls.

Pass Patterns

Native button

A native <button> is reachable with Tab and activates with Enter or Space.

HTML
<button>Submit</button>

Custom control with keyboard support

A <div> is given a role, tabindex, and key handlers so it works like a button, activating with both Enter and Space.

HTML
<div
    role="button"
    tabindex="0"
    onclick="submitForm()"
    onkeydown="if (event.key === 'Enter' || event.key === ' ') { event.preventDefault(); submitForm(); }">
    Submit
</div>

Fail Patterns

Clickable element not reachable by keyboard

The <div> has a click handler and looks like a button, but it is not focusable, so the keyboard cannot reach or activate it.

HTML
<div onclick="submitForm()" style="cursor: pointer">Submit</div>

WCAG techniques

Sufficient techniques

Advisory techniques

Failure techniques

Try It Yourself

Using a keyboard

  1. Open the page in a browser.
  2. Use the Tab key to move focus through the interactive elements.
  3. Try to activate each item with Enter or Space.

Expected results: Every interactive element can be reached and activated with the keyboard alone.

Actual results: Some elements are skipped or cannot be activated without a mouse.

Inspecting the browser dev-tools

  1. Open your browser's dev tools and go to the Accessibility panel.
  2. Select each interactive element.
  3. Check its role, name, and keyboard focusability.

Expected results: Each interactive element appears in the accessibility tree with a proper role and is keyboard focusable.

Actual results: Some elements are missing from the tree or are not keyboard focusable.

FAQ

How does this issue relate to 2.1.1 Keyboard?

SC 2.1.1 requires all functionality to be available through a keyboard interface. When an interactive element cannot be reached or operated with the keyboard, that functionality fails the criterion.

Why is this issue marked as Critical?

Keyboard inaccessibility is a complete barrier for people who navigate with a keyboard or keyboard-emulating assistive technology. It can make core site functionality, such as submitting a form, impossible to use.

Standards and Regulations

StandardSuccess CriterionReference
WCAG 2.22.1.1 Keyboard (A)All functionality of the content is operable through a keyboard interface without requiring specific timings for individual keystrokes, except where the underlying function requires input that depends on the path of the user's movement and not just the endpoints.
EN 301 5499.2.1.1 KeyboardSame as the WCAG text.
Section 5081194.21(a)When software is designed to run on a system that has a keyboard, product functions shall be executable from a keyboard where the function itself or the result of performing a function can be discerned textually.
508 Trusted Tester2.1.1-keyboard-access, 4.AAll functionality can be accessed and executed using only the keyboard.

Personas impacted by this issue