Level AOperable
2.1.1

Keyboard

Everything on the page must work with a keyboard alone, not just a mouse: menus, sliders, add-to-cart, modals, all of it.

In plain English

Some people never touch a mouse. They navigate entirely with the keyboard, Tab to move, Enter or Space to click, arrow keys inside menus. This rule is simple: if a mouse can do it, a keyboard has to be able to do it too. Every link, button, menu, slider, image zoom, modal, and checkout field.

The trouble almost always comes from custom controls built with plain <div> or <span> elements plus a mouse-click script. A mouse can click them, but the keyboard can’t even reach them.

Who this is for

  • Screen-reader users, who operate everything by keyboard.
  • People with motor conditions or tremors, who find a keyboard or switch device far easier than a mouse.
  • Power users who simply move faster with the keyboard.

What “good” looks like

Use real, focusable elements, and they get keyboard support for free.

<!-- Good: a real button, keyboard-operable by default -->
<button type="button" onclick="addToCart()">Add to cart</button>

<!-- Bad: a div that only a mouse can click -->
<div class="btn" onclick="addToCart()">Add to cart</div>

Test it with the mouse unplugged: Tab to each control, activate it with Enter/Space, and use arrow keys inside menus and carousels. If you can complete a purchase with only the keyboard, you pass.

Where stores get it wrong

Custom dropdowns, mega-menus, image zoomers, and “add to cart” controls built from non-focusable <div>s are the usual failures, along with carousels whose arrows only respond to a mouse. These show up constantly in a 10-minute self-check and on the common failures list.

How to meet it

Techniques the W3C accepts as sufficient (summarized). Follow a link for the full method.

Common mistakes

Patterns the W3C lists as failures of this criterion. Avoid these.

Frequently asked questions

What does the keyboard success criterion require?+

Success Criterion 2.1.1 (Level A) says all functionality must be usable with a keyboard alone. Anything a mouse can do, a keyboard must be able to do too, without needing specific timing for individual keystrokes.

How do I test keyboard access on my store?+

Put the mouse away. Press Tab to move between links, buttons, and fields; Enter or Space to activate them; and arrow keys inside menus and sliders. If you can browse, add to cart, and check out using only the keyboard, you pass. If any control can't be reached or used, it fails.

Why is keyboard access so important?+

Many people can't use a mouse: screen-reader users, people with motor or tremor conditions, and anyone using keyboard-like assistive tech. The keyboard is also the foundation other assistive technologies build on, so if the keyboard fails, much else fails too.

Reference

This is a plain-language explainer. The authoritative source is the W3C Web Content Accessibility Guidelines (WCAG) 2.2.

WCAG 2.2 © W3C. Excerpts are paraphrased; see the linked documents for the normative text.

Not sure if your store passes 2.1.1?

A human auditor checks this and every other criterion against your live store, and documents the result.

Book an audit