ScanFix/Knowledge Base/accessibility
medium Severity
accessibility

Missing Image Alternative Text (alt attribute)

Image elements (<img>) on the page lack an alt attribute.

Why This Issue Matters

Screen readers cannot describe visual content to visually impaired users, violating WCAG 2.1 guidelines and reducing Google Image search rankings.

How to Fix This Issue in Code

Ready to copy
Next.js / React (App Router)
// In Next.js, next/image enforces the alt attribute:
import Image from 'next/image';

<Image 
  src="/hero.jpg" 
  alt="Founder using ScanFix to inspect website health" 
  width={800} 
  height={600} 
/>
Standard HTML5
<img src="/hero.jpg" alt="Founder using ScanFix to inspect website health" />
WordPress / PHP
// In WordPress Media Library, always fill in the "Alternative Text" field for uploaded media.

Frequently Asked Questions

What if an image is purely decorative?

For decorative background flourishes or dividers, supply an empty string: alt="" so screen readers know to skip the element.

Check your website for missing image alternative text (alt attribute)

Run an instant audit with ScanFix to detect this defect and other quality gaps across your pages.