Skip to main content

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.

How OpenKeyNav helps

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.

Teams can use OpenKeyNav's on/off control to support the criterion's turn-off option when the final application gives users a discoverable and operable way to control it. The default toggle disables OpenKeyNav's character commands, including Click Mode, Move Mode, heading navigation, scroll-region navigation, and number-key heading navigation.

Implementation guidance

Keep the off mechanism available

Developers should preserve the modifier-based enable and disable command. The default configuration uses Shift + O. If developers change keys.menu or keys.modifierKey, the resulting command should continue to include a non-printable key.

The application should also 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. Teams must build an end-user remapping mechanism if they rely on the criterion's remap option.

Teams that rely on OpenKeyNav's turn-off option should verify that the final application exposes 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. Developers should test text fields, textareas, editable regions, search controls, and custom editors. Configuration changes and host-application key handlers can create new conflicts.

Document the state

The application should communicate whether OpenKeyNav shortcuts are on or off. Any visible setting should expose its state programmatically. Instructions should explain that the application may restore the previous choice on a later visit.

Limits

Teams establish conformance with 2.1.4 by evaluating every character-key shortcut in the final application. OpenKeyNav controls only its own commands.

  • The host application must keep the off mechanism discoverable and keyboard operable.
  • Developers must evaluate OpenKeyNav shortcuts together with every shortcut that the host application and its components add.
  • Teams must provide a separate end-user mechanism when they rely on remapping instead of OpenKeyNav's off control.
  • The application must keep the off command available after restoring an enabled preference.
  • Teams must test speech input, alternate keyboards, browser commands, operating-system commands, and assistive technology commands for conflicts.
  • The host application must 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.

  1. Clear the saved preference and confirm that printable character commands remain inactive before the user enables them.
  2. Enable OpenKeyNav and confirm that every documented character command performs only its intended action.
  3. Turn OpenKeyNav off and confirm that all of its printable character commands stop responding.
  4. Restore an enabled preference and confirm that users can still find and operate the off mechanism immediately.
  5. Dictate representative phrases with speech input and confirm that users can prevent accidental commands by turning the shortcut layer off.
  6. Type in text fields, textareas, editable regions, and custom editors without triggering OpenKeyNav commands.
  7. Check the final keys against application, browser, operating-system, and assistive technology commands.
  8. Confirm that users can perform each function through a conventional keyboard route after turning the shortcut layer off.