Text alternatives
Image buttons need alternative text
- Rule:
input-image-alt - Severity: Critical
- WCAG level A
Why it matters
<input type="image"> is a submit button drawn as a picture. Without alt the person is asked to submit a form by pressing something with no name.
How to fix it
- Add alt describing what the button does, not what the picture shows.
- Match the wording to the action ("Search", not "Magnifying glass").
In markup
<input type="image" src="search.png"><input type="image" src="search.png" alt="Search">The requirement behind it
This rule is one way of failing the following WCAG 2.2 success criteria. The W3C, which writes the standard, explains each of them:
- 1.1.1 Non-text Content (opens in new tab) — WCAG level A
- 4.1.2 Name, Role, Value (opens in new tab) — WCAG level A
Further reading
Deque University on input-image-alt (opens in new tab)
Deque maintains axe-core, the open-source engine our scanner runs. Their page documents the rule as the engine implements it.
Automated checks find failures a browser can prove. They cannot judge whether a caption is accurate, whether an alt text is useful, or whether a page can be operated end to end with a keyboard — those need a person.