Linting jsx-a11y adding role to div element

I am having problems 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 role="button"

it can't help me get through.

+3


source to share


1 answer


it is related to issue https://github.com/evcohen/eslint-plugin-jsx-a11y/issues/214 in the eslint-plugin-jsx-a11y plugin replica.



Please follow their conversations.

0


source







All Articles