【问题标题】:Linting jsx-a11y adding role to div elementLinting jsx-a11y 将角色添加到 div 元素
【发布时间】:2017-09-28 06:30:16
【问题描述】:

no-static-element-interactions 遇到问题

这是我没有通过的代码

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

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

【问题讨论】:

标签: javascript reactjs jsx eslint


【解决方案1】:

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

请关注他们的对话。

【讨论】:

    猜你喜欢
    • 2019-09-11
    • 1970-01-01
    • 1970-01-01
    • 2012-10-08
    • 2015-11-20
    • 2011-12-09
    • 2020-05-28
    • 2016-07-14
    相关资源
    最近更新 更多