Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

new a11y rule: mouse-events-have-key-events #279

Closed
HamletDRC opened this issue Sep 27, 2016 · 5 comments · Fixed by #849
Closed

new a11y rule: mouse-events-have-key-events #279

HamletDRC opened this issue Sep 27, 2016 · 5 comments · Fixed by #849
Labels
Difficulty: Medium People with non-trivial experience in TSLint should be able to send a pull request for this issue. Domain: Accessibility Rules around accessibility verification, commonly react-a11y-*. Status: Accepting PRs Type: Rule Suggestion Adding a new rule that doesn't yet exist here or in TSLint core.
Milestone

Comments

@HamletDRC
Copy link
Member

mouse-events-have-key-events

Enforce that onMouseOver/onMouseOut are accompanied by onFocus/onBlur for keyboard-only users.
http://oaa-accessibility.org/wcag20/rule/59/
http://oaa-accessibility.org/wcag20/rule/60/

onmousedown, onmouseup and onmousemove event handlers should have keyboard equivalents.
http://oaa-accessibility.org/wcag20/rule/63/

Check that elements with mouse event handlers also have key event handlers
http://oaa-accessibility.org/wcag20/rule/95/

Check that elements with ondblclick handles also have key event handlers
http://www.w3.org/TR/WCAG20-TECHS/SCR20
• From HTML Code Sniffer (https://squizlabs.github.io/HTML_CodeSniffer/Standards/WCAG2/)

@JoshuaKGoldberg JoshuaKGoldberg added Status: Accepting PRs Difficulty: Medium People with non-trivial experience in TSLint should be able to send a pull request for this issue. Type: Rule Suggestion Adding a new rule that doesn't yet exist here or in TSLint core. Domain: Accessibility Rules around accessibility verification, commonly react-a11y-*. labels Jul 7, 2018
@lizzzp1
Copy link
Contributor

lizzzp1 commented Feb 20, 2019

Would like this one as well. I can take this. Anything additional to note than what the description supplies?

@JoshuaKGoldberg JoshuaKGoldberg added the Requires Type Checker Must be implemented with a "typed" rule that uses a TypeScript program. label Feb 23, 2019
@JoshuaKGoldberg
Copy link

JoshuaKGoldberg commented Feb 23, 2019

Awesome, thanks @lizzzp1! There's not much that I can think of. One corner case would be ... props: the rule should use the type checker to determine if the handlers are in them.

@lizzzp1
Copy link
Contributor

lizzzp1 commented Mar 5, 2019

@JoshuaKGoldberg
Copy link

@lizzzp1 +1 for the prior art. Yes, let's make these two different rules.

@JoshuaKGoldberg
Copy link

Hmm, now I'm wondering whether it makes sense to take on the overhead of a typed rule... let's say that can be an optional nice-to-have as a followup.

@JoshuaKGoldberg JoshuaKGoldberg removed the Requires Type Checker Must be implemented with a "typed" rule that uses a TypeScript program. label Mar 12, 2019
@IllusionMH IllusionMH added this to the 6.2.0-beta milestone May 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Difficulty: Medium People with non-trivial experience in TSLint should be able to send a pull request for this issue. Domain: Accessibility Rules around accessibility verification, commonly react-a11y-*. Status: Accepting PRs Type: Rule Suggestion Adding a new rule that doesn't yet exist here or in TSLint core.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants