Hello forum, I have a picture (logo) on top of a page. The logo has an “on click” event and therefore the html attribute “role=button” is applied. I want to get rid of the “role=button” attribute. Does anybody knows a way of getting rid of the attribute whithout loosing the “on click” action of the logo picture? kind regards, Jasper
Because we want to change it to a link instead of a button. Because of the clickable nature of the picture plus event it gets the role=”button” automatically.
Maybe I misunderstand the requirement, but if you want to open a link from an image you can change the on click event:
instead of clicking the image itself, you could also apply the on click event to the div that could be wrapping your image
That doens’t change the role to “link”. I am trying to do so because of the accessability.