13.1. Ensure that scripts can be activated with both the mouse and the keyboard
Each time that a script can be activated with a mouse, it should be possible to activate it with a keyboard (and vice versa).
That is to say, each time a mouse can activate a script using an element (i.e. a button, link, etc.) the element should:
- Be focusable with a keyboard.
- Allow activation of the script using the keyboard once the element is given focus.
Keyboard shortcuts vary from system to system. Therefore, whenever possible, avoid interactions with specific keys.
For example, to trigger an action when the user tabs away from an element, listen with the generic event
onblur rather than using Tab and Maj + Tab keys.
Ensure that the tactile interactions work with both the mouse and keyboard.