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.