Technique F99:Failure of Success Criterion 2.1.4 due to implementing character key shortcuts that cannot be turned off or remapped
About this Technique
This technique relates to 2.1.4: Character Key Shortcuts (Failure).
This failure applies to web content that can be interacted with using a physical keyboard as input mechanism.
Description
When keyboard shortcuts using only character keys are implemented, voice commands can inadvertently trigger functionality. Character key shortcuts use a single key such as a letter key (including upper- and lower-case letters), punctuation, number, or symbol characters.
Content must either not implement single character key shortcuts, or offer settings to either turn off these shortcuts or to map them to keyboard shortcuts that employ an additional modifier key, such Alt or Ctrl.
Note
The use of a single key keyboard shortcut is not a failure if the shortcut is only active when a particular interface element has focus. For example, when a select element or a custom listbox has focus, the input of single character keys to navigate the list is a useful feature.
The test procedure suggests asking the author (often the developer of the site) whether keyboard shortcuts are used. If that information is trusted then the procedure can be simpler than pressing all the keys.
The success criterion does not apply when single key shortcuts are only active when interface elements have the focus, for example, a select
element. Here, pressing a letter key is used for fast navigation within the select options.
Viewing page scripts and searching for typical keyboard event handlers like document.addEventListener('keydown' ...)
or the presence of the .keycode
attribute
may establish the presence of scripts that intercept keyboard shortcuts without modification keys like ALT or Ctrl being held down at the same time. As there are several ways of implementing character key events, this method is not considered reliable.
Some browsers employ single key shortcuts with Shift. For example, Firefox opens a page search when pressing Shift + / and a search in page links when pressing Shift + '. In these cases, it will be necessary to press Esc or click an empty part of the page to remove the focus from the browser input.
Example
An application uses the single key shortcut S to bring up a search popup. There is no setting available to turn off or modify the shortcut.
Tests
Procedure
If the site does not provide settings to disable or remap keyboard shortcuts:
- If loading the page sets focus to an input, click on an empty part of the page to ensure that no inputs are in focus.
- Press keys identified by the author as shortcut keys, or if this information is not available, press all printing characters (i.e., all number, letter, sign and punctuation keys). Do not press non-printing modifier and control keys such as Ctrl, Alt, Esc, Arrow keys and (where present) the function keys F1-F12. Also exempt are Space, Enter, Return, Tab, and the Delete key.
- Hold the Shift key and press the same keys again.
- Check whether a function has been triggered by pressing the keys
Expected Results
If check #4 is false then this failure condition applies and the content fails the Success Criterion.