reactjs / react-a11y

Identifies accessibility issues in your React.js elements
MIT License
2.34k stars 126 forks source link

click-events-have-key-events only applies to non-interactive elements #168

Closed erikpuk closed 5 years ago

erikpuk commented 5 years ago

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 and onMouseUp since those would seem to be just as inaccessible as onClick.

erin-doyle commented 5 years ago

Thank you very much for the PR! Unfortunately, since this library has been deprecated (notice here) in favor of react-axe I am going to close this PR.