Image elements have [alt] attributes

Images have descriptive alt text or are marked as decorative.

On this page

Impact

ScanGov impact ratings

About

Informative elements should aim for short, descriptive alternate text. Decorative elements can be ignored with an empty alt attribute.

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

<!-- Informative image: describe what it shows -->
<img src="seal.png" alt="Official seal of the Department of Veterans Affairs">

<!-- Decorative image: empty alt so screen readers skip it -->
<img src="divider.png" alt="">

Error

ScanGov messaging when a site fails a standard:

Failed: Image elements have [alt] attributes

Examples

Informative image:

<img src="chart.png" alt="Bar chart showing federal IT spending 2020–2024">

Decorative image (no information):

<img src="decorative-swoosh.svg" alt="">

Guidance

Indicators

On this page