Accessibility Auditor — checks that every
<img> on the audited page carries an alt attribute, as required by WCAG 2.2 Success Criterion 1.1.1 (Non-text Content).Accessibility
Screen readers read the
alt text aloud, so visitors who cannot see an image still get its message.Standards
Follows WCAG 2.2 Success Criterion 1.1.1 Non-text Content (W3C Recommendation, 12 December 2024).
alt attribute is the text alternative of an image. Screen readers announce it, browsers show it when the image fails to load, and search engines index it. An image with no alt attribute leaves assistive technology guessing (most screen readers fall back to the file name), while alt="" deliberately tells them the image is decorative and can be skipped. This auditor reads the HTML of the audited URL and reports both cases: a missing alt fails, an empty one warns so the owner can confirm the image carries no meaning.
How it works
- Fetch — sends a
GETrequest to the audited URL as 37AuditsBot. A blocked request ends the audit with590; any other failure (timeout, DNS, TLS, non-2xx answer) ends it with500. - Parse — parses the HTML with jsoup and collects every
<img>element in document order. The page is not rendered, so images added by JavaScript are not seen. - Rules — each
<img>with noaltattribute is oneFAILfinding (400); each<img>whosealtis present but empty or whitespace-only is oneWARNINGfinding (300). The finding’s resource is the image’s absolutesrc(falling back to the rawsrc, then the page URL), and its data carriessrc,absoluteSrc,altand the image’s 1-basedindex. - Aggregate — FAIL wins over WARNING. When every image has a non-empty
alt, or the page has no images at all, the audit isSUCCESS(200) with the image count in the message. - Specification pin — every run emits
37A-ImageAltAuditor-100(INFORMATION), naming WCAG 2.2 Success Criterion 1.1.1 Non-text Content (W3C Recommendation of 12 December 2024). It does not change the overall status.
What it audits
Every row maps to onecheckRule* method and one CheckCode, in the order the auditor runs them. CheckCode suffixes use status ranges: 100 information, 200 success, 300–399 warning, 400–499 fail, 500–599 error.
Output documentation
Risks and considerations
Why alt text matters
- Blind and low-vision visitors rely on screen readers, which can only describe an image through its
alttext. A missing alternative hides product photos, charts, buttons drawn as images and infographics from them. - Search engines index
alttext and use it for image search, so descriptive alternatives bring traffic and help rank the page. - WCAG 1.1.1 is a Level A criterion, the minimum that accessibility laws and procurement rules (ADA, EN 301 549, the European Accessibility Act) point to.
Empty alt is not always wrong
alt=""is the correct markup for a purely decorative image (a spacer, a background flourish, an icon next to its own label). Screen readers skip it on purpose.- The auditor cannot tell a decorative image from a meaningful one, so an empty
altonly warns. Review each warning: keepalt=""for decoration, write a description for anything that carries information.
Changes from the previous version of this auditor
- A page whose only problems are empty
altattributes is nowWARNING; it used to beFAIL.alt=""is valid for decorative images, so it no longer fails the page on its own. - The auditor no longer emits a
SUCCESScheck for every well-described image; a single200check with the image count replaces them. - A fetch failure is reported as
ERROR(500) with the observed error instead of a generic message, and a blocked request as590.
What this auditor does not check
- Only the audited URL is parsed; other pages of the site may have images without
alt. - The HTML is not rendered: images inserted by JavaScript, CSS background images,
<svg>and<canvas>graphics are not inspected. - The quality of the
alttext is not judged: “image”, “photo” or a file name counts as non-empty. Images withrole="presentation"oraria-hidden="true"but noaltstill fail, sincealtremains required on<img>.