How to fix: image buttons without text
WCAG 2.2 success criterion 1.1.1 (level A)
Why it matters
Screen reader users do not know what the button does.
How to fix
Add an alt attribute to <input type="image">.
<input type="image" src="search.png" alt="Search">
Test it yourself
- Inspect image buttons (<input type="image">), often search or submit icons, and look for an alt attribute that says what the button does.
Common mistakes
- alt="search icon" instead of alt="Search".
- Leaving the alt empty, so the button has no name at all.
Check your own site
Find this and other problems on your website in 30 seconds, free.