[英]Linting jsx-a11y adding role to div element
I am having trouble with no-static-element-interactions 我遇到了无静态元素交互的问题
Here is my code that doesn't pass it 这是我的代码没有通过它
<div
className={ `selector-button ${ displayType === "GRID" && "active" }` }
onClick={ this.handleClick.bind( this, "GRID" ) }
role="button"
>
Even adding a role="button"
can't help me to pass through. 即使添加一个
role="button"
也无法帮助我通过。
this is related to https://github.com/evcohen/eslint-plugin-jsx-a11y/issues/214 issue on eslint-plugin-jsx-a11y plugin repo. 这与eslint-plugin-jsx-a11y插件仓库中的https://github.com/evcohen/eslint-plugin-jsx-a11y/issues/214问题有关。
Please follow the conversation their. 请按照他们的谈话。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.