WCAG 2.1.4 Character Key Shortcuts
W3C requires authors to provide at least one safeguard for a shortcut made only from printable characters. Users must be able to turn it off, remap it to include a non-printable key, or use it only while its component has focus.
Read W3C's Understanding Success Criterion 2.1.4: Character Key Shortcuts.
OpenKeyNav's implementation path
OpenKeyNav keeps its character commands inactive for a first-time user. The default Shift + O command turns the shortcut layer on and off. OpenKeyNav stores the user's choice in a cookie, so a later visit can restore the enabled state.
OpenKeyNav's on/off control implements the criterion's turn-off option when users can discover and operate it in the final application. The default toggle disables OpenKeyNav's character commands, including Click Mode, Move Mode, heading navigation, scroll-region navigation, and number-key heading navigation.
- OpenKeyNav
- Keeps its character commands inactive until enabled, provides a persistent modifier-key toggle, and exposes configurable command keys.
- You
- Make the control discoverable, communicate its state, preserve non-shortcut routes, and test the final command set with speech input and assistive technologies.
ResultUsers can prevent single-character commands from triggering accidentally.
Implementation guidance
Keep the off mechanism available
Keep the modifier-based enable and disable command. The default configuration uses Shift + O. When changing keys.menu or keys.modifierKey, include a non-printable key in the resulting command.
Provide visible instructions or a visible setting so users can find the off mechanism before learning its shortcut.
Treat developer configuration as build-time configuration
OpenKeyNav lets developers choose different character keys for its modes through the keys configuration. OpenKeyNav applies that configuration at build time. To implement the criterion's remap option, provide an end-user remapping mechanism.
Expose and verify the off mechanism in every place where OpenKeyNav commands can run.
Protect text entry
OpenKeyNav skips mode-command handling while a text input or editable region holds focus. Test text fields, textareas, editable regions, search controls, and custom editors together with the final configuration and host-application key handlers.
Document the state
Communicate whether OpenKeyNav shortcuts are on or off. Expose the state of any visible setting programmatically, and explain that the application may restore the previous choice on a later visit.
Complete the shortcut implementation
Evaluate every character-key shortcut in the final application. Use OpenKeyNav's on/off control for its commands, and apply the same safeguard analysis to application and component shortcuts.
- Keep the off mechanism discoverable and keyboard operable.
- Evaluate OpenKeyNav shortcuts together with every shortcut added by the application and its components.
- Provide an end-user remapping mechanism when the implementation uses the criterion's remap option.
- Keep the off command available after restoring an enabled preference.
- Test speech input, alternate keyboards, browser commands, operating-system commands, and assistive technology commands for conflicts.
- Preserve a non-shortcut path to each function.
Accessibility and WCAG Support covers related criteria and complete-page evaluation.
Verification checklist
Test the final shortcut configuration with OpenKeyNav off and on.
- Clear the saved preference and confirm that printable character commands remain inactive before the user enables them.
- Enable OpenKeyNav and confirm that every documented character command performs only its intended action.
- Turn OpenKeyNav off and confirm that all of its printable character commands stop responding.
- Restore an enabled preference and confirm that users can still find and operate the off mechanism immediately.
- Dictate representative phrases with speech input and confirm that users can prevent accidental commands by turning the shortcut layer off.
- Type in text fields, textareas, editable regions, and custom editors without triggering OpenKeyNav commands.
- Check the final keys against application, browser, operating-system, and assistive technology commands.
- Confirm that users can perform each function through a conventional keyboard route after turning the shortcut layer off.