Why it matters
Speech input users may accidentally trigger shortcuts when dictating text. Users with motor impairments may accidentally press keys. Single-character shortcuts can cause chaos for these users.
Common violations
- Single-key shortcuts (e.g., 'j' for next, 'k' for previous) that cannot be disabled
- Keyboard shortcuts that conflict with speech input commands
- Character shortcuts active even when user is typing in a text field
- No settings panel to remap or disable shortcuts
Code examples
Bad
document.addEventListener('keydown', (e) => {
if (e.key === 'j') nextItem();
if (e.key === 'k') prevItem();
});Good
document.addEventListener('keydown', (e) => {
if (!shortcutsEnabled) return;
if (e.target.matches('input, textarea')) return;
if (e.key === 'j' && e.ctrlKey) nextItem();
});How to fix
Allow users to disable or remap single-character shortcuts. Require modifier keys (Ctrl, Alt, Shift) for global shortcuts. Ensure shortcuts are inactive when focus is in text input fields.
Related criteria
Related resources
Scan your site