Fix jsx-a11y/no-static-element-interactions warnings raised by jsx-a11y linter.
To get a list of accessibility warnings raised by jsx-a11y linter run: yarn lint:jsx-a11y.
From that list please note all instances that are flagged to have "jsx-a11y/no-static-element-interactions" problem. Each one needs to be addressed individually.
Once all of the instances are resolved make sure to change this setting in .eslintrc.jsx-a11y from:
"jsx-a11y/no-static-element-interactions": ["warn", {
"handlers": ["onClick", "onMouseDown", "onMouseUp", "onKeyPress", "onKeyDown", "onKeyUp"]
}],
to
"jsx-a11y/no-static-element-interactions": ["error", {
"handlers": ["onClick", "onMouseDown", "onMouseUp", "onKeyPress", "onKeyDown", "onKeyUp"]
}],
So this error is essentially, not using buttons for actions and instead using divs/spans/etc.
What we want to do here as detailed is go through the warnings, assess the context of the markup, and devise a strategy to handle the cases as consistently as possible. For example, if we have something making an image or a span with an onClick handler, we'd change those to buttons with the text/image node inside of that.
That's correct. Buttons is just one of the interactive elements, there's also anchor and other types of inputs (radios, checkboxes) etc. In worst case scenario, and highly discouraged, ARIA role can be used to set the semantics of the interactive element.
Yup, we need to chose the appropriate interactive element to used depending on the task. But, we'd be better off taking advantage of them rather than using aria roles and scripting all the extra needs manually.
/claim
Thanks for claiming the issue! :wave:
!!! Please check your email and confirm the invitation
Here are some links for getting setup, contributing, and developing. We're always happy to answer questions in slack! If you become busy, feel free to /unclaim it.
:fox_face: Debugger team!
@ash-tamraz @Garbee is this issue free ?
@phoenixking25 No, I'm still working on it and am close to having a patch ready.
@yzen @ash-tamraz I'd like to help on this if it isn't being worked on anymore?
/claim
Firefox Developer Tools (including Debugger tool) development is entirely happening in Bugzilla and new issues should be reported here: https://bugzilla.mozilla.org/enter_bug.cgi?product=DevTools&component=Debugger
Also, supporting JSX in the code base is not on our long term roadmap, so this might be invalid report.
Honza