eslint-plugin-jsx-a11y: no-static-element-interactions - false positive
no-static-element-interactions correctly throws with the following code:
<div styleName="container" onClick={this.props.onClick}>
But still fails once I add role="button"
<div styleName="container" onClick={this.props.onClick} role="button">
According to https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md , it should succeed once I add the role attribute.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 5
- Comments: 16 (1 by maintainers)
Commits related to this issue
- UPGRADE: eslint-plugin-jsx-a11y has a known false positive [https://github.com/evcohen/eslint-plugin-jsx-a11y/issues/272] which is causing some a11y related fixes to get pinged in CR, this is with it ... — committed to agreene-coursera/eslint-config-coursera by agreene-coursera 7 years ago
- Disable no-static-element-interactions rule due to false positives described in https://github.com/evcohen/eslint-plugin-jsx-a11y/issues/272 — committed to USStateDept/State-TalentMAP by mjoyce91 7 years ago
Thank you for the report. I’ll look into it!
Note that this hasn’t been the case for awhile now;
eslint-config-airbnbhas supported v5 for awhile, and v16 of the config supports v6 of this plugin.Turns out this is an invalid template for testing. it needs to be closed. @javaherian I need some more info from you to proceed. Are you sure that the rule being triggered after you add
role="button"isn’tinteractive-supports-focus?