Level
A
Since
WCAG 2.0
Entries
33 / 193
/ WCAG criterion

2.1.1 Keyboard

Everything on the page that can be done with a mouse must also be possible with the keyboard alone.

/ What it requires

Every link, button, form field, menu, tab set, slider and custom widget has to work from a keyboard, with no step that needs a mouse and no keystroke that must be timed. This is the base that other input methods stand on: screen readers, switch devices, voice control and on-screen keyboards all send keyboard commands. When a control ignores the keyboard, blind users and people who cannot hold or steer a mouse are stopped at that control.

A page passes when each function can be reached and operated with keys such as Tab, Shift+Tab, Enter, Space, the arrow keys and Escape. The criterion names one exception: functions whose input depends on the path of the movement and not only on its end points, such as freehand drawing. Dragging an item from one place to another is not excepted, because only the end points matter there. The level AAA criterion 2.1.3 removes even that exception.

/ How pages fail it

  • A div or span has a click handler but no tabindex and no role, so the Tab key skips it.
  • A dropdown menu opens on mouse hover only and has no keyboard way to open it.
  • A custom select, date picker or slider responds to clicking and dragging but ignores the arrow keys.
  • A link is written as an a element without an href and wired up in script, which takes it out of the tab order.
  • The close control of a dialog is an icon inside a div, so a keyboard user can open the dialog but cannot close it.

/ How to check it yourself

  1. Put the mouse aside, click in the address bar and press Tab repeatedly. Compare the stops with the controls you can see and confirm each one receives focus.
  2. Activate every control you reach: Enter on links, Enter and Space on buttons, Space on checkboxes, arrow keys in radio groups, selects, tab sets and menus.
  3. Open every menu, accordion, dialog and date picker with the keyboard, use it, then close it with Escape or its close button.
  4. Look for things that only react to hover, dragging or a double click, and check each has a keyboard route to the same result.
  5. Run a free checker such as Accessibility Insights for Web, whose Tab stops view draws the path focus takes, and compare that path with the page.

/ How to fix it

  • Use the native element: button for actions, a with an href for navigation, input, select and textarea for data. They take focus and respond to the keyboard with no extra code.
  • Where a custom element is unavoidable, add tabindex="0", the matching role, and a keydown handler for Enter and Space next to the click handler.
  • In composite widgets such as tab lists and menus, keep one item at tabindex="0" and the rest at tabindex="-1", and move focus between them with the arrow keys.
  • Give every hover or drag interaction a second route: a button that opens the menu, up and down buttons to reorder a list, a text field next to a slider.

/ What our scanner checks

Three checks run on the rendered page. keyboard-unreachable reports a visible element that carries an interactive role or an onclick attribute and that the Tab key cannot reach. tabs-no-roving-focus and menu-no-roving-focus report tab lists and menus in which the number of tab stops is not exactly one. Click handlers attached in script are not seen, and no check presses keys to confirm that a control works.

/ Who fails it, in our own measurements

Measured bodies failing this criterion, most instances first
BodySectorInstancesScore
Hannovercity · DE4210
Bydgoszczcity · PL257
Radomcity · PL132
Chicago Transit Authoritytransport · US124
Olsztyncity · PL108
Amtraktransport · US71
Phoenixcity · US71
Trybunał Konstytucyjnygovernment · PL714
Teatr Wielki Opera Narodowaculture · PL63
Uniwersytet Warszawskieducation · PL53
State of Washingtongovernment · US48
Uniwersytet Marii Curie-Skłodowskiejeducation · PL49
Uniwersytet Mikołaja Kopernikaeducation · PL47
Bundesnetzagenturgovernment · DE39
Baltimorecity · US27
Freie Universität Berlineducation · DE27
PKP Intercitytransport · PL22
Pacjent.gov.plhealth · PL29
Rybnikcity · PL27
Berlincity · DE141
Bundestaggovernment · DE110
Cook Countygovernment · US111
Częstochowacity · PL121
Deutsche Bahntransport · DE16
Internal Revenue Servicegovernment · US120
Kölncity · DE116
Ministerstwo Rolnictwagovernment · PL132
Policjagovernment · PL112
RWTH Aacheneducation · DE118
Stuttgartcity · DE16
University of Floridaeducation · US123
Uniwersytet Ekonomiczny w Krakowieeducation · PL115
Łódźcity · PL13

One page per body, measured by automated checks on a weekly schedule. Any body that has fixed something since the last sweep will show it at the next one, and every entity page carries a right of reply.

/ Questions about this criterion

Does WCAG 2.1.1 mean every element must be focusable?

No. Only things a user can operate need to be reachable: links, buttons, fields and custom controls. Headings, paragraphs and images that do nothing should stay out of the tab order. Adding tabindex="0" to static text makes a page slower to move through with a keyboard and does not help screen reader users, who read text with other commands.

Is drag and drop a failure of 2.1.1?

Only when dragging is the sole way to do the job. The exception in the criterion covers input that depends on the path of the movement, such as drawing a signature. Moving a card between columns depends on where it starts and ends, so it needs a keyboard alternative, for example a move button or a menu of destinations.

Do custom keyboard shortcuts satisfy 2.1.1?

They can be part of the answer, but users have to be able to find and use them. The dependable route is the standard one: Tab to reach a control, Enter or Space to activate it, arrow keys inside a widget. Single-character shortcuts bring their own requirement under criterion 2.1.4, which asks for a way to turn them off or remap them.