Rules / image rules

image.alt.exists

Default
error
Plugin
image

An <img> has an alt attribute.

Why: Search engines and screen readers use alt text to understand images. An empty alt="" is allowed: it marks a decorative image that should be skipped.

When off: images without alt pass.

<!-- ✗ Fails -->
<img src="/bread.jpg" />

<!-- ✓ Passes -->
<img src="/bread.jpg" alt="A basket of fresh bread" />
<img src="/divider.svg" alt="" />

References