Rule
Image button alt text
Image inputs need alt text describing their action.
- Rule
input-image-alt- WCAG 2.2
- 1.1.1 Non-text Content (opens in a new tab) (Level A)
4.1.2 Name, Role, Value (opens in a new tab) (Level A) - Severity
- Critical
What it checks
An <input type="image"> is a submit button drawn as a picture. It needs a name from alt, aria-label or aria-labelledby. Without one, browsers fall back to a generic name such as "Submit", which does not say what this button does, so the rule fails it.
Example
Fails
<form action="/search">
<input type="search" name="q" aria-label="Search the site">
<input type="image" src="magnifier.png" width="24" height="24">
</form>
Passes
<form action="/search">
<input type="search" name="q" aria-label="Search the site">
<input type="image" src="magnifier.png" width="24" height="24" alt="Search">
</form>
The engine is tested against both examples.
How to fix it
Add an alt that names the action, such as alt="Search", not a description of the picture.
Check your own pages
This rule runs in every pour audit: the browser extension, the bookmarklet, the command line and the editor. Get pour, free.