Fix "Image button without a text alternative" in HTML
Why it's a problem
An <input type="image"> is a submit button drawn by an image. Without alt, the screen reader announces “button” or the file name: the user cannot tell whether they are placing an order, searching or deleting something.
How to fix it — HTML
Set alt to the ACTION label, not a description of the picture: “Search”, “Place order”. Better still, replace it with a real <button> holding a decorative image and text.
<input type="image" src="/img/loupe.svg"><!-- alt = l'action, pas le dessin -->
<input type="image" src="/img/loupe.svg" alt="Rechercher">
<!-- Ou, mieux : un vrai bouton -->
<button type="submit">
<img src="/img/loupe.svg" alt=""> Rechercher
</button>Check your site in 30 seconds
Conformly detects this kind of issue across all your pages, continuously, and alerts you on every regression.
Free scan