Skip to main content
WCAGrules
Quick navigation

Style real text instead of text images

Fonts, colors, sizes and alignment are all CSS's job, which means a headline that looks designed can still be text. W3C lists C22 as sufficient for 1.4.5 Images of Text at Level AA and for its no-exception counterpart at AAA, and as advisory for structure and for resize text. The framing on W3C's page is wider than the anti-image argument people usually reach for. It is about separating what the content is from how it looks, so a reader can change the look, the size, the color, the family, the placement, to whatever they need. Text baked into a PNG allows none of that. It cannot be resized without blurring, recolored, selected, searched, translated, or read aloud, and every one of those is something somebody relies on. Logos and pure decoration are outside the rule.

How we find it in an audit

This is a looking job, because no tool reliably separates a picture of words from a photograph. We go through the images on each template and read them, then check the alt text on any that turned out to be text. An image of text still needs its words available, even where a design decision keeps the image.

How affected users experience it

It reaches further than screen readers. Somebody enlarging text gets crisp body copy and a blurred headline. Somebody using a browser translation gets the page in their language with the banner still in English. Somebody with a custom stylesheet gets their colors everywhere except the image. And where the alt text is missing, the headline is simply gone.

Passes vs. fails

Passes: the button grows with its text. Fails: fixed sizes shear the label.

Passes

<h2 class="display">Summer Sale</h2>

<style>.display { font-family: "Marketing Serif", Georgia, serif;
  letter-spacing: 0.02em; }</style>

Fails

<img src="heading-summer-sale.png" alt="Summer Sale">

How this gets tested

The W3C publishes test rules that define what a checker looks for here.

The other techniques filed under this rule

52 guides on this site are filed under 1.3.1 Info and Relationships. W3C lists this one as advisory for that rule rather than sufficient, which means it helps real readers without being accepted as evidence you conformed.

This guide is our interpretation of W3C technique C22: Using CSS to control visual presentation of text. W3C publishes its techniques as guidance rather than as the standard, and says so on every one of them. The success criterion is what conformance is measured against, and a technique is one documented way to meet it.

Go somewhere useful

Find tools, resources and your workspace.

29 destinations