It seems like this rule only makes sense for non-interactive elements, since the spacebar works just fine on button, a, etc elements and no keyboard event is needed.
This PR lets that rule pass for interactive elements. It also triggers the rule on onMouseDown and onMouseUp since those would seem to be just as inaccessible as onClick.
Re: https://github.com/reactjs/react-a11y/issues/167
It seems like this rule only makes sense for non-interactive elements, since the spacebar works just fine on
button
,a
, etc elements and no keyboard event is needed.This PR lets that rule pass for interactive elements. It also triggers the rule on
onMouseDown
andonMouseUp
since those would seem to be just as inaccessible asonClick
.