Image ALT Attributes

Ensures all images have descriptive ALT attributes for accessibility and SEO.

What is this check?

The ALT attribute (or 'alt text') is a text description of an image within its `<img>` tag.

Why is it important?

1. **Accessibility:** Screen readers read alt text aloud for visually impaired users. 2. **SEO:** It provides context to search engines, helping them understand the image and index it for image search. 3. **Broken Images:** If an image fails to load, the alt text is displayed instead.

What is the impact?

Missing alt text harms accessibility and is a missed SEO opportunity. Search engines can't 'see' images, so alt text is crucial for context.

Example Implementation

<!-- Good Example -->
<img src="puppy.jpg" alt="A golden retriever puppy playing with a red ball in the grass">

<!-- Bad Example (for a meaningful image) -->
<img src="puppy.jpg" alt="image">

<!-- OK for purely decorative images -->
<img src="decorative-line.png" alt="">