Skip to content

Latest commit

 

History

History
45 lines (33 loc) · 1.96 KB

File metadata and controls

45 lines (33 loc) · 1.96 KB
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

Missing Redundant Event Handlers Check

Description

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).

Example outcome

I identified 1 instance where redundant event handlers are not used.

Impact

  • 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.

Fixes

To address missing redundant event handlers:

  1. Locate the element that can be triggered by a mouse event but can't be triggered by a keyboard event.
  2. Add an attribute (e.g., onkeydown) to allow the triggering with a keyboard event.
  3. If applicable, use a semantic HTML button instead which has built-in keyboard accessibility.

Resources