The WCAG text spacing rule, 1.4.12, says no content or function may be lost when a user raises line height to 1.5 times the font size, paragraph spacing to 2 times, letter spacing to 0.12 times and word spacing to 0.16 times. You do not have to use those values in your own design; your layout just has to survive when someone applies them. Level AA; first published in version 2.1.
Quick facts
Level
AAAdded in
WCAG 2.1Line height
1.5 times the font sizeParagraph spacing
2 times the font size after each paragraphLetter and word spacing
0.12 and 0.16 times the font sizeQuick test
Apply the four values with a bookmarklet, then look for clipped or overlapping text
Four numbers to remember
Each value is a multiple of the font size. The table shows what that means for body text set at 16 CSS pixels.
| Property | Multiple of font size | At 16 px | CSS property |
|---|---|---|---|
| Line height | 1.5 | 24 px | line-height |
| Space after paragraphs | 2 | 32 px | margin-bottom on paragraphs |
| Letter spacing | 0.12 | 1.92 px | letter-spacing |
| Word spacing | 0.16 | 2.56 px | word-spacing |
These are minimums the page must tolerate, not targets. A user may choose any of them, all of them, or bigger values; the rule tests the four together at exactly these levels.
What WCAG text spacing does and does not require
The rule is about robustness. People with dyslexia, low vision and some cognitive disabilities often read better with more space between lines, letters and words. They set it with a browser extension, a user stylesheet or a reading tool. The rule makes sure your page does not fall apart when they do.
- Required: with the four values applied, every word remains on screen and legible, and every control still responds.
- Not required: shipping those values, a spacing control on the page, or support for even larger values.
- Scope: content built with markup such as HTML. Text inside images is not affected, which is another reason to avoid images of text.
Who changes their text spacing
Readers with dyslexia often find crowded letters blur together; extra letter and word spacing helps them separate words. People with low vision use extra line height so their eyes can find the next line. Some people with attention difficulties use paragraph spacing to break text into chunks. Many of them never touch zoom, so text spacing problems can appear on pages that pass every zoom test.
Testing with a text spacing bookmarklet
A bookmarklet is a bookmark that runs a short script on the current page instead of opening a new address. Several accessibility teams publish free text spacing bookmarklets that apply the four WCAG values with the highest priority, so they beat your own CSS.
- Add the bookmarklet to your bookmarks bar.
- Load the target page and look it over once.
- Run the bookmarklet. Text across the page should spread out.
- Scan every component: navigation, buttons, tabs, badges, cards, form labels, error messages, tooltips, footers.
- Look for words cut off, words that overlap other words, and text hidden behind other boxes.
- Open menus, accordions and dialogs, since hidden content is not visible on first load.
If you cannot install a bookmarklet, apply the same values in the browser developer tools on the body element. They are shown in the code section below.
What usually breaks
| Component | Failure | Fix |
|---|---|---|
| Buttons and tabs | Fixed height cuts the bottom line off | Use min-height and vertical padding |
| Cards with a teaser paragraph | overflow: hidden hides the last words | Let the card grow, or truncate in the content, not the CSS |
| Navigation bar | Items overlap or the last one drops out of view | Allow wrapping, or collapse into a menu earlier |
| Badges and labels on images | Absolutely positioned text spills over the image edge | Place text in normal flow next to the image |
| Line height set in px | Lines crash into each other when overridden partly | Use a unitless line-height such as 1.5 |
Truncating text with an ellipsis is not automatically a failure, but if the hidden words cannot be reached any other way, content is lost. Avoid clipping important text.
Write CSS that survives the override
These are the test values as plain CSS. A bookmarklet applies the same values but forces them over every other rule.
* { line-height: 1.5; letter-spacing: 0.12em; word-spacing: 0.16em; }
p { margin-bottom: 2em; }Fails: the button cannot grow, so a second line of text disappears.
.btn { height: 40px; overflow: hidden; }Passes: the button keeps its minimum size and grows when the text needs more room.
.btn { min-height: 2.5rem; padding: 0.5rem 1rem; }Languages the rule treats differently
Not every writing system uses all four properties. Some scripts, for example, do not use letter spacing in the same way as English. WCAG allows content in those languages to meet the rule using only the properties that exist for that language and script. For English and most Latin based languages, all four apply.
Connected criteria
Text spacing sits beside 1.4.4 Resize text and 1.4.10 Reflow: all three test whether your layout can flex. At AAA, 1.4.8 Visual presentation goes further: for blocks of text there must be a way to get line spacing of at least 1.5 within paragraphs, among other reading settings. W3C explains the details in Understanding Text Spacing. Keep it on your WCAG checklist for every component, since one rigid button style can fail across a whole site.
Questions people ask
What is WCAG 1.4.12 text spacing?
The text spacing rule, at level AA, first appeared in version 2.1. Pages must not lose content or function when users set line height to 1.5, paragraph spacing to 2, letter spacing to 0.12 and word spacing to 0.16 times the font size.
Do I have to set line height to 1.5 in my design?
No. You can use any spacing you like. The rule only asks that the layout survives when a user applies those values.
What is a text spacing bookmarklet for WCAG testing?
It is a bookmark that runs a small script to apply the four WCAG spacing values to the page you are viewing. Testers use it because it is quick and works in any desktop browser.
Does text spacing apply to text inside images?
No. The rule covers content written in markup languages such as HTML. Text inside images cannot be respaced, which is one reason WCAG asks you to avoid images of text.
Is text in an ellipsis a failure?
Only if the cut off words are lost. If the full text is available another way, such as on the next page or when expanded, it can pass, but clipping key words is risky.