WCAG 2.2 - Success Criterion
2.1.4 Character Key Shortcuts
Description
If a keyboard shortcut is implemented using only a single letter, punctuation, number, or symbol character key, then the user must be able to turn it off, remap it to include a modifier key (such as Ctrl, Alt, or Shift), or have it active only when the relevant component has focus. This criterion was introduced to address conflicts between web application shortcuts and the single-character shortcuts used by screen readers and other assistive technologies.
How To Test
- Review the page or application documentation for any advertised keyboard shortcuts.
- Tab through the page and, without focusing any form field, press single letter keys (a–z), number keys, and common punctuation keys (/, ?, !, etc.).
- Note any unintended actions that are triggered by these single-character keypresses.
- If single-character shortcuts exist, look for a setting (often in a preferences or help menu) to turn them off or remap them to use a modifier key.
- Verify the setting works and that shortcuts remain disabled or remapped after the setting is saved.
- Confirm that shortcuts tied to a specific focused component (e.g., arrow key navigation inside a list) only fire when that component has focus.
Testing Tools
- axe DevTools — Browser extension. Install from official page, open DevTools, go to axe tab, run scan. Look for focus order, keyboard trap, and focus visible violations.
- NVDA — Free screen reader for Windows. Download and install, then open Firefox and navigate the demo using Tab, Shift+Tab, arrow keys, and Enter. Listen for focus announcements.
- Browser DevTools Accessibility Inspector — Built into all browsers. Right-click on a focused element, select "Inspect", open DevTools, go to Accessibility tab to see the accessibility tree and focus properties.
Demo
Pressing "S" anywhere on the page triggers a search action - even while a screen reader user is navigating or composing text.
Try it: Focus below and press the "S" key:
A modifier key (Ctrl) is now required: press Ctrl+S to trigger search. Single "S" key presses no longer interfere with content entry or assistive technology navigation.
Try it: Focus below and press Ctrl+S:
Code
Code
The application uses single-character shortcuts (D for delete, A for archive, R for reply) with no documentation or user control. Users cannot discover or disable them.
Keyboard shortcuts exist but are not listed anywhere. Pressing "D" deletes, "A" archives, "R" replies - all without warning and with no way to turn them off.
Shortcuts are documented in a preferences panel where users can review them and disable any that conflict with their assistive technology or workflow.
Preferences - Keyboard Shortcuts (click to expand)
Uncheck any shortcut to disable it. Changes save automatically.
Code
Code
The delete shortcut (D) is active everywhere in the application. Pressing D deletes the selected message even when focus is in the compose area, causing accidental message deletion while typing.
Messages
D = Delete (active)
Compose
D = Delete (active - DANGER)
The delete shortcut (D) is only active when focus is in the message list. When focus is in the compose area, D types the letter D normally. The shortcut is scoped to its relevant context.
Messages
D = Delete (active when this list has focus)
Compose
D = Types letter (shortcut inactive here)
Code
Code
Fail Explanation
A failure occurs when a web application binds functionality to a single character key globally - for example, pressing "S" to search or "D" to delete - with no way for the user to disable or remap that shortcut. Screen reader users often speak commands letter-by-letter or use single-key navigation shortcuts, and these will accidentally trigger the application's shortcut instead, causing unintended actions such as deleting content, submitting forms, or navigating away from the current view. Additionally, users of voice control software (like Dragon NaturallySpeaking) may trigger shortcuts while dictating.
Pass Explanation
A passing implementation either avoids single-character shortcuts altogether, or provides one of these three approaches:
- Add a modifier key: Require Ctrl, Alt, or Shift to be held with the character (e.g., Ctrl+S instead of S).
- Scope to focus: Activate the shortcut only when a specific component (like a search input) has keyboard focus.
- Document and control: List all shortcuts in a visible, accessible preferences menu where users can disable any that conflict with their assistive technology or workflow.
Notes
This criterion is particularly relevant for single-page applications and productivity tools (email clients, document editors, project management apps) that implement rich keyboard shortcut schemes. Shortcuts that already require a modifier key (e.g., Ctrl+S) are not subject to this criterion. Testing this criterion requires understanding the assistive technology being used - what shortcuts does NVDA use? What does Dragon NaturallySpeaking rely on? The best approach is often to support modifier keys or provide detailed, user-configurable shortcut settings.
WCAG Techniques
- Failure: F99
- Success Techniques: G202, SCR35
Techniques
WCAG techniques used in this demo: G217