Do not justify text to both margins
Justified text is stretched until both margins line up, and the stretching goes into the gaps between words, which opens rivers of white running down the paragraph. F88 is the failure technique that names it. Check what it is filed under before you plan the work, because it changes the size of the job. W3C files F88 under a Level AAA visual-presentation rule and under nothing else, so no Level A or AA rule in WCAG 2.2 prohibits justified text. Even at AAA the requirement is not a ban. It asks that a mechanism exist for the reader to turn justification off, and a browser may supply that mechanism rather than your site. So this is real harm, worth fixing, and it is not the legal exposure a Level AA finding would carry.
How we find it in an audit
A stylesheet sweep catches text-align justify and the old align attribute in one pass, which makes this among the cheapest things in an audit to detect. A reviewer then decides whether it matters, since the harm belongs to blocks of text and a justified three-word caption hurts nobody. Where we report it, we report it as what it is, a AAA-level finding rather than a Level AA defect, because the weight of a finding is part of the finding.
How affected users experience it
Readers with cognitive disabilities take the brunt of this, and the damage is done by the white space rather than the words. Uneven gaps pull the eye down the page instead of across it, so the line being read keeps getting lost and has to be found again. Anyone who reads by tracking with a finger or a ruler runs into the same thing. It is slow, it is tiring, and nothing on the page explains why this paragraph is harder work than the last one.
Passes vs. fails
Passes
p { text-align: left; }Fails
p { text-align: justify; }The other techniques filed under this rule
21 guides on this site are filed under 1.4.8 Visual Presentation. 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.
- C12sufficientSize text in percent so it scales
- C13sufficientUse named font sizes that respect user defaults
- C14sufficientSize text in em units, not pixels
- C19sufficientAlign text left or right, never justified
- C20sufficientCap line length with relative column widths
- C21sufficientGive paragraphs breathing room with line spacing
This guide is our interpretation of W3C technique F88: Failure of Success Criterion 1.4.8 due to using text that is justified (aligned to both the left and the right margins). 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.