Image buttons must have alternative text

How to fix the input-image-alt accessibility rule. Images and text alternatives.

What this rule checks

Ensure <input type="image"> elements have alternative text

Who is affected

An image used as a button has no name, so screen-reader users don't know what it does.

How to fix it

Add alt text that describes the action, not the picture.

Example

Before

<input type="image" src="go.png">

After

<input type="image" src="go.png" alt="Search">

WCAG success criteria

When this rule fails, the page fails:

Find it on your own page

Scan a web page and the report lists every element that fails this rule, with screenshots outlining where they are, the code, and a selector you can paste into your browser’s developer tools.

More detail