2.1.4 Character Key Shortcuts
Level A · added in WCAG 2.1
Shortcuts that use only a letter, number, punctuation or symbol key must be possible to turn off or remap. Otherwise, they must work only when their component has focus.
Who it helps
Speech input users dictate words, and each spoken letter can fire a single-key shortcut by accident. Keyboard users with tremors or motor disabilities also hit keys by mistake and trigger actions they did not intend.
How to meet it
- Offer a setting that turns single-key shortcuts off, and remember the choice.
- Or let users remap each shortcut to include a modifier key such as Ctrl or Alt.
- Or make the shortcut active only while its component has focus, such as type-ahead letters inside a focused list box.
- Shortcuts that already need Ctrl, Alt or Cmd, and keys like Escape or the arrows, are not covered by this criterion.
- Check that shortcuts never fire while the user is typing in an input, textarea or contenteditable area.
Examples
<script>
document.addEventListener("keydown", (e) => {
if (e.key === "s") {
e.preventDefault();
document.getElementById("search").focus();
}
});
</script><label><input type="checkbox" id="shortcuts" checked> Single-key shortcuts</label>
<script>
const toggle = document.getElementById("shortcuts");
document.addEventListener("keydown", (e) => {
if (!toggle.checked || e.target.closest("input, textarea, [contenteditable]")) return;
if (e.key === "s") {
e.preventDefault();
document.getElementById("search").focus();
}
});
</script><script>
document.addEventListener("keydown", (e) => {
if (e.altKey && e.shiftKey && e.code === "KeyS") {
e.preventDefault();
document.getElementById("search").focus();
}
});
</script>Can a scanner detect this?
No
axe-core has no rule for shortcuts, because key handlers live in JavaScript and only show up when keys are pressed. Press letter, number and symbol keys outside form fields, and check for a setting that turns them off.
No automated rule tests this criterion. Check it by hand.
Common mistakes
- Adding single-letter shortcuts from a library, such as a video player or email client, without an off switch.
- Offering a way to turn shortcuts off that is hard to find or resets on each visit.
- Ignoring shortcuts that use Shift with a letter, which still count as character keys.
- Testing only with a keyboard and never with speech input.
Related criteria
Check your own page
See which automated WCAG checks your page fails, with the failing elements and how to fix them.
Reviewed November 2, 2026