Text Spacing: Room to Adjust Lines and Letters
Also called: Text spacing override, Line height, Letter spacing, Word spacing
Definition
Text Spacing is WCAG success criterion 1.4.12. 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, no content or functionality may be lost.
Text Spacing is the WCAG rule that a page must keep working when visitors increase the space between lines, paragraphs, letters and words. Many people with dyslexia or low vision read faster with more white space and apply it with a browser extension or their own stylesheet. The website does not have to use these values – it only must not break when someone else does.
What it means
WCAG 1.4.12 Text Spacing is a Level AA criterion of WCAG 2.2. In content built with markup languages that support these properties, no loss of content or functionality may occur when the user sets all of the following – and nothing else:
| Property | Minimum value | At a 16 px font |
|---|---|---|
| Line height (line spacing) | 1.5 × font size | 24 px |
| Spacing after paragraphs | 2 × font size | 32 px |
| Letter spacing (tracking) | 0.12 × font size | 1.92 px |
| Word spacing | 0.16 × font size | 2.56 px |
Exception: languages and scripts that do not use one or more of these properties may conform using only the ones that apply to them.
W3C stresses that these values are a minimum baseline for users, not a design rule for authors. Typical failures (F104) are text that is clipped by a box with a fixed height, text that overlaps the next element, and buttons whose label no longer fits.
Text spacing goes hand in hand with resize text and reflow: all three check whether a layout survives the adjustments people with low vision really make.
Examples
<style>
/* Good: boxes grow with their text */
.card { min-height: 10rem; padding: 1rem; }
.button { padding: 0.5em 1em; white-space: normal; }
/* Bad: fixed height and hidden overflow cut off spaced-out text */
.card-title { height: 48px; overflow: hidden; }
</style>
<!-- Bad: inline !important users cannot override -->
<p style="line-height: 1.1 !important; letter-spacing: -0.02em !important">
Free shipping on all orders
</p>
<!-- Good: spacing set in the stylesheet, without !important -->
<p class="promo">Free shipping on all orders</p>Let containers size themselves to their content (min-height, padding, flexible widths), allow labels to wrap onto a second line, set spacing in stylesheets instead of inline styles and leave room in navigation bars, tabs and badges (W3C techniques C36 and C35).
Give text boxes a fixed height with overflow: hidden, force buttons onto one line with white-space: nowrap in a tight space, or use !important on spacing in style attributes.
How to check text spacing
Questions
What are the WCAG text spacing values?
Line height 1.5 times the font size, spacing after paragraphs 2 times, letter spacing 0.12 times and word spacing 0.16 times the font size. Users must be able to apply all four at once without losing content.
Do I have to use 1.5 line height on my website?
No. WCAG 1.4.12 does not set your design values. It only requires that the page still works when users increase spacing to these values themselves.
Why does inline !important fail text spacing?
An !important declaration in a style attribute wins over user stylesheets, so visitors cannot add the spacing they need. Move spacing into your stylesheet and drop the !important.
Who benefits from more text spacing?
W3C names people with low vision, people with dyslexia who read faster with more spacing, and people with cognitive disabilities who find it easier to tell blocks of text apart.
Related terms
Resize Text: Readable and Usable at 200%
Resize Text is WCAG success criterion 1.4.4. Except for captions and images of text, text must be resizable up to 200 percent without assistive technology and without loss of content or functionality.
Read definition: Resize Text: Readable and Usable at 200%Reflow: Content That Fits at 400% Zoom
Reflow is WCAG success criterion 1.4.10. Content must work without loss of information or functionality and without scrolling in two directions at a width equal to 320 CSS pixels – or a height of 256 CSS pixels for horizontally scrolling content.
Read definition: Reflow: Content That Fits at 400% ZoomColor Contrast: WCAG Ratios and How to Check Them
Color contrast is the difference in brightness between text or interface elements and their background, measured as a ratio from 1:1 to 21:1. WCAG requires at least 4.5:1 for normal text and 3:1 for large text.
Read definition: Color Contrast: WCAG Ratios and How to Check ThemDyslexia: Web Content People Can Read
Dyslexia is a learning disability that mainly affects reading and spelling: recognizing written words and sounding them out. It does not affect intelligence. Many people with dyslexia read websites with adjusted fonts, spacing and colors or with text-to-speech.
Read definition: Dyslexia: Web Content People Can Read