AltVision

WCAG alt text requirements, explained

Updated

WCAG success criterion 1.1.1 Non-text Content (Level A) requires every image that conveys information to have a text alternative that serves the same purpose. Decorative images must be hidden from assistive technology with an empty alt attribute (alt=""). The rule is the same in WCAG 2.1 and 2.2.

What success criterion 1.1.1 says

1.1.1 Non-text Content is a Level A criterion, the most basic level of WCAG conformance. All non-text content presented to the user needs a text alternative that serves the equivalent purpose, with a few exceptions such as decoration, CAPTCHAs and tests. For images on the web, the text alternative is almost always the alt attribute.

Accessibility laws and standards that reference WCAG 2.1 or 2.2 Level AA — such as EN 301 549 under the European Accessibility Act, and the U.S. Department of Justice's ADA Title II rule — include 1.1.1, because Level AA includes every Level A criterion.

What to write for each kind of image

  • Informative images (photos, illustrations that add meaning): describe what the image communicates in context. alt="Volunteers planting trees along the river bank"
  • Decorative images (dividers, background flourishes, images whose content is already in the text next to them): use an empty alt, alt="". Do not leave the attribute out.
  • Functional images (an image that is a link or a button): describe the action or destination, not the picture. A magnifying-glass button gets alt="Search"; a logo linking home gets alt="AltVision home".
  • Images of text: the alt text contains the same words. Prefer real text where you can — 1.4.5 Images of Text (AA) asks you to.
  • Complex images (charts, diagrams, maps): give a short alt that says what the image is and its key point, and put the full data or explanation in nearby text or a table.

Common failures

  • Missing alt attribute. Screen readers often fall back to reading the file name, such as "IMG underscore 4021 dot JPEG".
  • Alt text that doesn't match the purpose, like describing a logo's colours instead of naming the company it links to.
  • File names or keywords as alt text, such as alt="hero-banner-final-v2" or a list of SEO terms.
  • Redundant phrasing like "image of" or "picture of" — screen readers already announce that it is an image.
  • Repeating the caption word for word in the alt, so screen reader users hear it twice.

WCAG does not set a maximum length. Keep alt text to the point — usually a sentence — and move longer explanations into the page.

How to check a page against 1.1.1

Automated checkers can find images with no alt attribute, but only a person can judge whether alt text serves the same purpose as the image. A practical workflow is to find the missing ones automatically, then review each image in context. How to find missing alt text on a website walks through both.

Questions

Is alt text required by WCAG?

Yes. Success criterion 1.1.1 Non-text Content (Level A) requires a text alternative for every image that conveys information, and an empty alt (alt="") for decorative images.

Should decorative images have alt text?

They should have an empty alt attribute, alt="", so screen readers skip them. Leaving the attribute out entirely is a failure, because many screen readers then read the file name.

How long should alt text be under WCAG?

WCAG sets no character limit. Write the shortest text that serves the same purpose as the image, typically one sentence, and put longer descriptions of complex images in the page itself.

Did WCAG 2.2 change the alt text rules?

No. Success criterion 1.1.1 is unchanged between WCAG 2.0, 2.1 and 2.2.