Character Key Shortcuts
A shortcut bound to a single letter, number, or symbol must be switchable off, remappable, or active only while the relevant control has focus. Speech-input users trigger these constantly just by talking.
- Principle
- Operable
- Guideline
- 2.1
- Level
- A
- In WCAG since
- 2.1
- Number
- 2.1.4
Broken, then fixed
The same interface twice: first with the mistake, then with the smallest change that fixes it.
Single-key shortcuts, always listening.
Bound at the document level with no way to disable them. A voice-control user dictating "send this" fires several of these mid-sentence, and one of them deletes something.
Scoped to focus, or remappable, or off.
Any one of the three remedies satisfies this: add a modifier, require a sequence, scope the binding to the focused component, or offer a setting to turn shortcuts off. The last is the only one that also helps someone whose disability makes accidental keypresses likely.
How to test
Check your own interface against 2.1.4, one step at a time.
- Look for keyboard shortcuts in the page’s help, its settings and its code: search the scripts for keydown or keypress handlers that act on a single character.
- Click on an empty part of the page so that no field has focus. Press each letter, number, punctuation mark and symbol key in turn, and note any that does something.
- For each shortcut found, check that at least one of these holds: a setting turns it off, a setting changes it to include Ctrl, Alt or another modifier key, or it works only while its own control has focus.
- Turn on speech recognition (Voice Control on a Mac, Voice access on Windows 11) and dictate a sentence with the page open. Check that no word sets off a shortcut.
Common questions
Do shortcuts that use Ctrl or Alt fall under 2.1.4?
No. 2.1.4 covers shortcuts made only of printable characters: letters, numbers, punctuation and symbols. A shortcut that needs Ctrl, Alt or Cmd is not set off by speech input or by a stray key press, so it is out of scope.
Do I have to offer a way to turn off and a way to remap each shortcut?
No. One is enough for each shortcut. It can be turned off, or remapped to include a modifier key, or it can work only while its own control has focus.
Does typing a letter to jump to an option in a listbox fail 2.1.4?
No. A listbox or a drop-down menu responds to letters only while it has focus, which is one of the ways to pass. The risk is a shortcut that listens to the whole page.
Try it yourself
A lab is a small working piece of interface that you change yourself. Read its steps, use the controls under it, and watch the verdict line at the bottom: it says whether the criterion passes or fails as you go. Reset puts it back.
Try it: dictate past a shortcut
How to use this lab
- Goal. Dictate a reply by voice in a mail client where the letter e archives the message.
- The controls. The choices under “The archive shortcut” set it to “e, always on”, “Remapped to Alt+E” or “e, only while the message has focus”. Dictate “see you there” speaks the phrase into the Reply box, and speech input arrives as key presses. The binding shows the code for the shortcut.
- Try this. The lab starts with “e, always on”, and fails. Press Dictate “see you there” and watch every e go missing from the reply as the message is archived. Then choose either of the other settings and dictate again.
- What it means. If the shortcut is remapped to use a key such as Alt, or works only while the message has focus, 2.1.4 passes. If a single letter is on everywhere, 2.1.4 fails: speech input users set it off with ordinary words, and so do people who press keys by mistake. The verdict line under the lab says which.
The binding
document.onkeydown: key === 'e' → archive()2.1.4 fails
Also in guideline 2.1
Criteria in the same guideline often fail together.