Skip to main content
WCAGrules
Quick navigation

Let users switch off fully justified text

G172 offers a version of the page whose text is not justified to both margins. In practice that means a control swapping in a stylesheet that aligns text to one side. W3C says the control should be easy to find and near the beginning of the page. W3C lists it as a sufficient technique for 1.4.8 Visual Presentation, which is Level AAA. It is not one of the two techniques W3C names for the Level AA text spacing rule, and those two are CSS techniques about surviving reader-set spacing rather than about justification. There is machinery underneath this one. W3C ties the style-switcher route to WCAG's conforming alternate version provision, so the switched version has to carry the same content and meet the level being claimed. That is a lot of scaffolding. Removing justification from the original is simpler and usually better.

How we find it in an audit

A CSS scan finds justified text wherever it is declared. Our reviewers then check three things. Whether a control exists, where it sits, and whether it survives navigation to the next page. A preference that resets on every page is a preference nobody will use twice.

How affected users experience it

Justification stretches the gaps between words unevenly, line by line. Readers with dyslexia see those gaps line up into rivers running down the page, which pulls the eye off the line it was following. People with cognitive disabilities lose their place in the same way. At high magnification the effect is worse, because the reader only sees a few words at a time and the rhythm changes under them.

Passes vs. fails

Passes: the box grows with spacing. Fails: fixed height eats the text.

Passes

A 'Text preferences' control adds a class that sets text-align to left, and the choice is remembered across the site.

Fails

article p { text-align: justify; } with no way to change it, so every paragraph is full of stretched, uneven word gaps.

Other ways to satisfy this rule

21 guides on this site are filed under 1.4.8 Visual Presentation. W3C lists this one as sufficient for that rule on its own. Implement it correctly, in a way your readers' software actually supports, and the rule is met.

This guide is our interpretation of W3C technique G172: Providing a mechanism to remove full justification 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