繁体   English   中英

Linting jsx-a11y为div元素添加角色

[英]Linting jsx-a11y adding role to div element

我遇到了无静态元素交互的问题

这是我的代码没有通过它

      <div
        className={ `selector-button ${ displayType === "GRID" && "active" }` }
        onClick={ this.handleClick.bind( this, "GRID" ) }
        role="button"
      >

即使添加一个role="button"也无法帮助我通过。

这与eslint-plugin-jsx-a11y插件仓库中的https://github.com/evcohen/eslint-plugin-jsx-a11y/issues/214问题有关。

请按照他们的谈话。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM