Add shortcuts in layers, not through one page-wide listener. Make app-wide commands modifier-based, treat plain character keys as belonging to the focused editor or widget, and enforce that boundary before shortcut matching runs. If you offer character-only shortcuts, follow Understanding SC 2.1.4 Character Key Shortcuts: let users turn them off, remap them to include a non-printable key, or make them active only on focus. For component behavior and conflict avoidance, align with Developing a Keyboard Interface.
What shortcut policy is safe by default?
A safe default is simple: global shortcuts should use a non-printable modifier such as Ctrl, Cmd, or Alt, while plain letters, numbers, and punctuation stay local to the focused control. WCAG calls out why: character shortcuts are easy to trigger accidentally, especially with speech input, and it requires that such shortcuts be configurable or focus-scoped.
That makes Cmd+K or Ctrl+K a better app-wide command than k. It also matches the ARIA keyboard model, where Tab and Shift+Tab move between components, while keys like arrows often operate within a composite widget such as a menu, grid, or radio group.
Where should the app enforce the boundary?
Enforce shortcut ownership in the dispatch order.
First, decide whether the event belongs to editing or to the focused widget. If focus is in an input, textarea, select, or contenteditable region, or text composition is active through an IME, do not run global shortcut matching for printable keys. Let the editor or widget handle them.
Only after the app decides the event is not editing-related should it evaluate global shortcuts.
This ordering prevents the classic failures: typing into a rich-text editor triggers navigation, a speech phrase fires letter commands, or arrow keys meant for a grid or tree get stolen by the page shell. The ARIA guidance explicitly covers focus movement between components, focus management inside composites, and the need to avoid conflicts with assistive technology, browser, and operating-system commands.
How does this work in a mixed navigation-and-editor app?
Use layered ownership.
Worked example:
- App shell:
Cmd+Kopens the command palette. - Sidebar navigation:
gthenhgoes to Home, but only when the sidebar itself has focus. - Rich-text editor focused: letters insert text, arrows move the caret, and editor-local shortcuts stay in the editor.
- Modal dialog open: dialog shortcuts win until it closes, then focus returns to the trigger.
Decision checklist:
- Is this action global, or only meaningful inside one focused component?
- If global, can it use a modifier instead of a printable character?
- Does shortcut dispatch stop before matching when focus is editable or composition is active?
- Does it collide with browser, OS, or assistive technology commands?
- Is there a visible alternative, plus disable or remap controls for character shortcuts?
How should users discover and escape shortcuts?
Shortcuts should accelerate visible actions, not replace them. Put the command in a menu, toolbar, or command palette, and list bindings in a help overlay. For character shortcuts, include an obvious way to disable them or switch to modifier-based bindings.
Also expect some browser and platform reservations. Not every key combo is yours to claim, and fighting built-in commands usually creates fragile behavior across devices.
When are single-letter commands acceptable?
When they are tightly scoped to a focused component or mode. A focused canvas, code editor, or data grid can justify them. Page-wide single-letter navigation is the risky case.
Should shortcuts be configurable?
Yes. At minimum for character-only shortcuts, shared workstations, and accessibility-sensitive workflows. Disable plus remap is a strong baseline.
Start by moving all keyboard handling behind one dispatcher that first answers “editing or app command?” and only then evaluates shortcuts. Reviewed: 2026-09-05.
Sources are linked throughout this guide. Product capabilities can change; consult the linked documentation for your deployment.
Read our editorial approach ↗