| Title | Missing Redundant Event Handlers Check |
|---|---|
| id | ehandler_02 |
| type | prop |
| elem | ehandler |
| test | ehandBothNo |
| score | 1 |
| level | A |
| trust | 1 |
| ref | SCR20 |
| scs | 2.1.1,2.1.3 |
| dis | 53511 |
| result | failed |
The "Missing Redundant Event Handlers Check" evaluates whether there is any interactive element with a mouse event handler (like onclick) that does not include the corresponding keyboard event handler (like onkeypress, onkeydown, or onkeyup).
I identified 1 instance where redundant event handlers are not used.
- Visual Impairments: Many screen reader users navigate via keyboard. If they can’t trigger mouse-bound actions with the keyboard, they will be locked out of parts of the site.
- Motor Impairments: Users who cannot use a mouse (e.g., due to tremors, paralysis, or limb amputation) and rely on keyboards or assistive tech like switch devices will be unable to activate functionality that's mouse-only.
To address missing redundant event handlers:
- Locate the element that can be triggered by a mouse event but can't be triggered by a keyboard event.
- Add an attribute (e.g.,
onkeydown) to allow the triggering with a keyboard event. - If applicable, use a semantic HTML button instead which has built-in keyboard accessibility.