I have an
<img> that is when clicked should perform an action, so I wrapped it inside a
<button> like this:
<button class="cat"> <img src="" alt="Cat"> </button>
Regarding accessibility, a button should have role and label. Normally, a button's label is its content inside the opening and closing tags, but in our case there's only an image.
So how to make the button accessible in this case? is the 'alt' attribute enough?