Skip to content

Rule · Lint

Image without alt

lint/missing-alterrorvoid lintupdated

Why it matters

Screen readers announce the file name (or nothing), image search can't index it and Lighthouse/axe fail the page. next/image also warns at runtime.

How to fix it

Describe what the image communicates in alt. Use alt="" only for purely decorative images.

Example

tsx
<Image src={chart} alt="Revenue grew 42% quarter over quarter" />
<img src="/divider.svg" alt="" />

References

void lint reports 67 rules in this category. Static source checks with no browser: Tailwind v4 silent failures, Next.js 16 API traps, React render-body bugs, accessibility markup, SEO files and motion hygiene.