- Success Criterion 2.1.4
- Conformance level A
- W3C reference F99
Single-Letter Keyboard Shortcut With No Way to Turn It Off
2.1.4 — Character Key Shortcuts
Scenario
Setting
A news outlet's article page
What’s wrong
Single-letter keyboard shortcuts (like 'j', 's') can't be turned off or changed — speech-input users trigger them accidentally while dictating.
Example
document.addEventListener('keydown', (e) => {
if (e.key === 'j') goToNextArticle();
if (e.key === 'k') goToPreviousArticle();
if (e.key === 's') saveArticle();
});
// fires everywhere on the page, with no settings option to disable it Why it matters
A reader dictating a comment with speech-input software says a word containing "s" or "j" and the page jumps to a different article mid-sentence.
How to test
Press a single-letter/number/symbol shortcut while focus is on ordinary content: check Settings for a way to turn it off or remap it — if none exists, it fails.
How to fix
WCAG 2.1.4 requires single-character shortcuts to be turned off or remapped; add a persistent, discoverable settings toggle.
let shortcutsEnabled = true; // exposed via a Settings > Shortcuts toggle, stored per user
document.addEventListener('keydown', (e) => {
if (!shortcutsEnabled) return;
if (e.target.matches('input, textarea, [contenteditable]')) return;
if (e.key === 'j') goToNextArticle();
if (e.key === 'k') goToPreviousArticle();
if (e.key === 's') saveArticle();
}); Outcome
A reader dictating a comment finishes their sentence without the page jumping away underneath them.
Who is affected
Speech-input users and users with hand tremors who trigger keys unintentionally lose control of the page without warning.
Learn more
- Understanding Understanding document (opens in a new tab)
- Technique Related technique (opens in a new tab)
Related scenarios
- Global Single-Key Shortcut That Fires During Speech Dictation
- Library’s Default Hotkeys Shipped With No Settings Toggle
- Shortcut Remapping That Doesn’t Allow Modifier Key Combinations
- Shortcut Toggle Setting That Resets on Every Page Load
- Keyboard Shortcut That Fires Even While Typing in a Field
- Shortcut Off-Switch Hidden Behind the Very Barrier It Fixes