<input type="image"> elements have [alt] text

Image buttons have alt text that describes their action.

On this page

Impact

ScanGov impact ratings

About

When an image is being used as an <input> button, providing alternative text can help screen reader users understand the purpose of the button. [Learn about input image alt text](https://dequeuniversity.com/rules/axe/4.10/input-image-alt).

Risks

Screen reader users cannot identify or interact with elements.

Why it's important

Gives screen reader users meaningful descriptions of interactive elements so they can understand and use them.

User stories

As a screen reader user, I want all interactive elements to have clear, descriptive names so that I know what they do.

Code

Failing pattern:

<!-- Fail: image input with no alt text -->
<input type="image" src="submit-btn.png">

Passing pattern:

<!-- Pass: alt describes the action -->
<input type="image" src="submit-btn.png" alt="Submit form">

Error

ScanGov messaging when a site fails a standard:

Failed: <input type="image"> elements have [alt] text

Guidance

Indicators

On this page