Our series on the new WCAG 2.1 Success Criteria continues with the final new level A success criterion, 2.1.4 Character key shortcuts. It falls under the existing 2.1 guideline, Keyboard accessible.
2.1 Keyboard Accessible
Make all functionality available from a keyboard.
2.1.4 Character Key Shortcuts
If a keyboard shortcut is implemented in content using only letter (including upper- and lower-case letters), punctuation, number, or symbol characters, then at least one of the following is true:
- Turn off: A mechanism is available to turn the shortcut off;
- Remap: A mechanism is available to remap the shortcut to use one or more non-printable keyboard characters (e.g. Ctrl, Alt, etc);
- Active only on focus: The keyboard shortcut for a user interface component is only active when that component has focus.
Terminology
This success criterion is only applicable for shortcuts implemented using character keys. It does not apply when shortcuts need modifier keys, such as when using the accesskey
attribute.
Active Only on Focus
The select element is an example of a native element that uses single key shortcuts only when it has focus. When a select is open, you can type the letter of one of the choices to move to that choice. That is valid use of character key shortcuts under this success criterion.
Overview
Character key shortcuts allow keyboard users to quickly perform a command. Google mail has many single key shortcuts. Examples include press r to reply to a message or e to archive it.
Shortcuts may cause problems for speech input users. Speech input is words and words are strings of letters. If focus is on a control when the user speaks a word containing one or more shortcut keys, it may cause unexpected actions. Using Google mail as an example, if the user speaks, “Hey, Kim,” the e will archive the message, the k moves the cursor down one, and the m mutes the conversation (credit to Kim Patch for the example - see resources). This unexpected action is very confusing to the user. Google mail has a way to disable the single key shortcuts or to remap them. This success criterion requires that all applications provide a way to turn off or remap character key shortcuts.
Shortcuts that use two or more character keys together may also cause problems. This success criterion includes those as well.
Who Benefits
People with tremors, mobility issues, or an artificial hand may have difficulty with single key shortcuts. They may use speech input, a keyboard, or an alternative pointing device with an on-screen keyboard. They may press a shortcut key by mistake and invoke the command without knowing why. People who use a smaller keyboard with a mobile device who can’t as type well also benefit.
Takeaways
If you provide character key shortcuts provide a way to turn them off and a way to remap them. When remapping, allow users to assign one or more characters to the shortcut.
Resources
Kim Patch of patchontech, spoke on this topic at Knowbility’s 2018 AccessU. The slides and transcript from her talk provide more details and examples for this issue. The discussion of character key shortcuts begins on slide 15.