How to fix ‘Static HTML elements with event handlers require a role.’?

you need to add a role props in your a tag to avoid this warning, for example a button

<a role = "button" styling="link" onClick={() => this.gotoLink()}>
  <SomeComponent /> 

I guess it is because the HREF props is missing in your anchor tag (not sure)

Leave a Comment