WCAG 2.1 · Level A · Operable

WCAG 2.1.4 — Character Key Shortcuts, explained with examples

Single-character keyboard shortcuts must be turn-offable, remappable, or only active when the relevant control has focus. Voice control users speak the alphabet. A site with single-key shortcuts triggers commands every time the user dictates.

Number
2.1.4
Level
A
Principle
Operable
Guideline
2.1 Keyboard Accessible

Why this criterion exists

Voice control users speak the alphabet. A site with single-key shortcuts triggers commands every time the user dictates.

If you only remember one thing: single-character keyboard shortcuts must be turn-offable, remappable, or only active when the relevant control has focus. Everything else on this page is detail.

Who feels it when this fails

Accessibility criteria sometimes feel abstract until you see who pays the cost when a site ignores them. Character Key Shortcuts affects:

  • Voice control users

  • Users who type with assistive devices

How sites typically fail it

These are the patterns we see week after week. None are intentional — they are accidents of how teams build interfaces under deadline. Knowing the failure modes is the fastest path to writing them out of your component library.

  • Pressing "j" navigates to the next item without a modifier or focus requirement

How to test for it

  • Try every single-key shortcut; either require a modifier or scope to focused element.

Automated scanners catch this criterion most of the time, but never all of the time. Manual testing with the keyboard and a screen reader closes the gap.

A code fix you can copy

Require a modifier, or check that the target element has focus, before acting on single-key shortcuts.

The problem

JavaScript
document.addEventListener('keydown', e => { if (e.key === 'j') next(); });

The fix

JavaScript
document.addEventListener('keydown', e => {
  if (e.key === 'j' && (e.metaKey || e.ctrlKey)) next();
});

Require a modifier, or check that the target element has focus, before acting on single-key shortcuts.

Other Operable criteria

Find every accessibility issue on your site in 60 seconds.

Free public scan. No card. AI-generated fixes for every issue we find.