Skip to content
SilktideHelp

Character key shortcuts

Silktide finds pages that register a keyboard listener on the whole page - the document, window, or <body>/<html> - and asks you to check whether any single-character shortcuts need an escape hatch.

Familiar examples are pressing j to scroll down, \/ to focus search, or g then h to go home.

This is a : a global key listener is a real reason to look, but Silktide cannot tell from the registration alone whether the handler implements a single-character shortcut. Pages with no global key listener are not flagged.

Why this matters

Two groups are hit hard by always-on single-key shortcuts:

  • Speech input users dictate text and commands aloud. Software turns their speech into keystrokes, so an ordinary sentence becomes a stream of accidental shortcut activations - pages can jump, dialogues can open, and actions can fire mid-sentence.
  • People with low dexterity or tremors routinely strike keys they didn't intend, and any single key can be a live trigger.

success criterion 2.1.4 (level A) therefore requires that single-character shortcuts can be turned off, remapped to include a modifier key such as Ctrl or Alt, or only fire while the relevant control has .

How to fix it

For each global keyboard handler that implements a single-character shortcut, do one of the following:

  1. Provide a setting that turns the shortcuts off.
  2. Require a modifier key, so the shortcut becomes for example Ctrl+K instead of k.
  3. Only handle the key while the relevant control is focused - shortcuts scoped to a focused control are explicitly allowed.
// Fires whenever "k" is pressed, anywhere on the page
document.addEventListener('keydown', (e) => {
  if (e.key === 'k') openSearch();
});

// Fixed: requires Ctrl (or Cmd) to be held
document.addEventListener('keydown', (e) => {
  if (e.key === 'k' && (e.ctrlKey || e.metaKey)) openSearch();
});

If a flagged listener has no single-character shortcuts - or already offers one of these escape hatches - the finding.

How Silktide tests this

  1. Collect the keyboard the page registers in the browser.
  2. Keep only page-wide listeners - those attached to the document, the window, or the <body>/<html> element. Listeners on individual controls are exempt, because they only fire while that control is focused.
  3. Report each remaining listener for you to confirm. Silktide does not scrape the handler source for e.key === '\u2026' patterns - that is too brittle against minified and framework code. Presence of a global key listener is the signal; your review is the verdict.

Troubleshooting

The listener is not a single-character shortcut

Many global key handlers only watch Escape, arrow keys, or modifier combos. If yours has no single-character shortcuts, approve the finding.

The shortcut can already be disabled or remapped

Silktide can see the listener registration, but it cannot see whether your site offers a settings toggle. If it does, the page complies - approve the finding.

Shortcuts from third-party scripts

Chat widgets, video players, and analytics tools sometimes register their own global key listeners. They count against your page all the same; check the vendor's accessibility options or raise it with them.

Shortcuts created with the accesskey attribute

Those are covered separately by the Accesskey attribute check; this check covers shortcuts implemented in script.

Learn more

Last updated

Was this page helpful?

Character key shortcuts | Silktide Help