How accessible is your website?Start free check
WCAG 2.1.4Level AOperable

Character Key Shortcuts: Off, Remap or Focus

Also called: Single-key shortcuts, Single character shortcuts, Keyboard shortcuts

Definition

Character key shortcuts is WCAG success criterion 2.1.4. If a keyboard shortcut uses only letter, punctuation, number or symbol keys, users must be able to turn it off, remap it to include a non-printable key such as Ctrl or Alt, or it must be active only while its component has focus.

Character key shortcuts are shortcuts that fire on a single printable key – "s" for search, "j" for next, "?" for help. They save time for some people and cause chaos for others: speech input users dictate words that are read as strings of letters, and a stray keystroke can archive an email. WCAG 2.1.4 requires a way out.

What it means

WCAG 2.1.4 Character Key Shortcuts is a Level A criterion in WCAG 2.2. It applies when a keyboard shortcut uses only letters (upper or lower case), punctuation, numbers or symbols. Then at least one of these must be true:

Option What it means
Turn off A setting switches the shortcut off
Remap The shortcut can be changed to include a non-printable key such as Ctrl or Alt
Active only on focus The shortcut only works while its component has focus

The number of physical keys does not matter: Shift+/ for "?" still counts as a character shortcut, because it produces a printable character. Sequences such as "g" then "a" are covered too. Not covered: listboxes and drop-down menus, where typing a letter jumps to an option, and access keys.

W3C's example shows why it matters: in a webmail app, someone using speech input says "Hey Kim" to a coworker, and the letters trigger archive and mute commands. Keyboard users with dexterity challenges hit keys by accident – a press of "s" moves the focus to the search field and they lose their place. Shortcuts with Ctrl or Alt rarely fire by accident. Single keys also must not get in the way of keyboard navigation or a screen reader's own reading keys.

Examples

Example
<label>
  <input type="checkbox" id="shortcuts-on" checked>
  Use single-key shortcuts (j / k to move, s to search)
</label>

<script>
  document.addEventListener('keydown', (e) => {
    const on = document.getElementById('shortcuts-on').checked;
    const typing = e.target.closest('input, textarea, select, [contenteditable]');
    if (!on || typing || e.ctrlKey || e.metaKey || e.altKey) return;
    if (e.key === 's') { e.preventDefault(); document.getElementById('search').focus(); }
  });
</script>

The checkbox lets people turn every single-key shortcut off at once. The handler also ignores keys typed into form fields and combinations with modifier keys.

Do

Offer a setting to switch character shortcuts off, use Ctrl, Alt or Cmd combinations for global shortcuts, limit single keys to the focused widget, and list the shortcuts on a help page.

Don't

Bind global actions such as delete or archive to one letter, react to keys typed in form fields, or hide the off switch where nobody finds it.

How to check character key shortcuts

    Questions

    What is a character key shortcut?

    A keyboard shortcut that uses only printable characters – letters, numbers, punctuation or symbols – without Ctrl, Alt or Cmd. "j" for next item or "/" to open search are typical examples.

    Are Ctrl and Alt shortcuts covered by 2.1.4?

    No. A shortcut that includes a non-printable modifier key such as Ctrl or Alt does not fall under 2.1.4. Remapping a single-key shortcut to such a combination is one way to meet the criterion.

    Do I need a settings page for shortcuts?

    Not if the shortcut is only active while its component has focus, for example arrow and letter keys inside a focused grid. Global single-key shortcuts need a way to turn them off or remap them.

    Why are single-key shortcuts a problem for speech input?

    Speech input software can send spoken words as letters. Each letter may fire a shortcut, so one sentence can trigger a whole series of commands.

    How do I check my website for keyboard problems?

    Character shortcuts need a manual test by pressing keys. The free WCAG scanner helps with related issues such as buttons and links without a name.

    Let AI Handle Website Accessibility

    Built in Europe. Set up in 2 minutes, no developer needed. Put website accessibility on autopilot with AI-powered fixes and automated monitoring.

    1. 1Choose your plan
    2. 2Install in 2 min
    3. 3AI fixes your website
    4. Done