Missing Redundant Event Handlers Check

RuleSets of AccessMonitor - the validator of web accessibility practices

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

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