Skip to main content
WCAGrules
Quick navigation

Do not publish ASCII art without an alternative

A picture drawn out of keyboard characters is still a picture, and F72 is the failure technique for publishing one with no text alternative. The reasoning is the part worth keeping, because it is the first thing a developer disputes. The meaning of ASCII art comes from the shape the glyphs make when you look at them rather than from the characters themselves, so the string counts as non-text content and owes an alternative like any image. Put that alternative next to the art, or put a link to it next to the art, so the two are found together. A way to skip the block is a kindness and it is not the fix. W3C's own page ships ASCII art behind a skip mechanism and still says the page fails.

How we find it in an audit

Dense runs of slashes, pipes and underscores flag mechanically in the source, and every pre block gets a human look on top of that. The reviewer settles three questions. Whether it is art at all, what it depicts, and whether an alternative already sits close enough to be read with it. Chart-shaped ASCII gets the most attention, because that is where the missing content is data rather than decoration, and a description like decorative border will not cover it.

How affected users experience it

The screen reader reads what is genuinely there, which is punctuation. Slash slash backslash pipe underscore underscore, for as long as the art runs, sometimes for minutes on end. The listener never learns that a cat was being drawn or a chart plotted. They learn that the page stopped making sense, and they have no way to judge whether they missed something that mattered or nothing at all.

Passes vs. fails

Passes: alt text names the product. Fails: the file name is all there is.

Passes

<figure>
<pre aria-hidden="true">
 /\_/\
( o.o )
</pre>
<figcaption>ASCII art of a cat's face, drawn with slashes and parentheses.</figcaption>
</figure>

Fails

<pre>
 /\_/\
( o.o )
</pre>

How this gets tested

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

The other techniques filed under this rule

39 guides on this site are filed under 1.1.1 Non-text Content. W3C documents this one as a failure of that rule, so it describes a way the rule gets broken rather than a way to pass it.

This guide is our interpretation of W3C technique F72: Failure of Success Criterion 1.1.1 due to using ASCII art without providing a text alternative. 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