Skip to content

Files

Latest commit

 

History

History
23 lines (17 loc) · 687 Bytes

img-redundant-alt.md

File metadata and controls

23 lines (17 loc) · 687 Bytes

Pattern: Redundant image alt text

Issue: -

Description

Alt text should not include words like "image", "picture", or "photo" since screen readers already announce that the element is an image. Redundant words make the experience more verbose for screen reader users.

Examples

Example of incorrect code:

<img src="cat.jpg" alt="Image of a cat playing" />
<img src="dog.jpg" alt="Photo of a dog sleeping" />
<img src="bird.jpg" alt="Picture of a bird flying" />

Example of correct code:

<img src="cat.jpg" alt="Cat playing with yarn" />
<img src="dog.jpg" alt="Golden retriever sleeping on couch" />
<img src="bird.jpg" alt="Blue jay in flight" />