1.4.12 - Text spacing
Ensure that no information or functionality gets lost if users increase the space between lines, paragraphs, letters and words.
Summary
Web browsers allow users to change the spacing between lines of text, letters, words and paragraphs. Make sure that no loss of content or functionality happens when users do that.
Requirements (Web-only)
If users apply all of these changes together, no content or functionality should disappear from the screen or be truncated:
- When line height (line spacing) is changed to 1.5 times the font size;
- When spacing following paragraphs is changed to 2 times the font size;
- When spacing between letters (tracking) is changed to 0.12 times the font size;
- When spacing between words is changed to 0.16 times the font size.
Testing
You can use a browser plug in or directly edit typographic CSS on a page to change the styles so that:
- Line height (line spacing) is at least 1.5 times the font size;
- Spacing following paragraphs is at least 2 times the font size;
- Letter spacing (tracking) to at least 0.12 times the font size;
- Word spacing to at least 0.16 times the font size.
Make sure that all text fits within its containing box without being cut off or without overlapping other boxes.
Common mistakes
- Restricting the user from overriding text style.
- Setting both a maximum height and maximum width to elements, causing text to overflow if it takes more space.
Why?
- People with low vision may require increased space between lines, words, and letters are able to read text.
- People with dyslexia may increase space between lines, words, and letters to increase reading speed.
- White space between blocks of text can help people with cognitive disabilities comprehend sections of a page and call out boxes.
Official wording in the Web Content Accessibility Guidelines
1.4.12 Text Spacing (Level AA): In content implemented using markup languages that support the following text style properties, no loss of content or functionality occurs by setting all of the following and by changing no other style property:
- Line height (line spacing) to at least 1.5 times the font size;
- Spacing following paragraphs to at least 2 times the font size;
- Letter spacing (tracking) to at least 0.12 times the font size;
- Word spacing to at least 0.16 times the font size.
Exception: Human languages and scripts that do not make use of one or more of these text style properties in written text can conform using only the properties that exist for that combination of language and script.
See the W3C's detailed explanation of this guideline with techniques and examples.
Guidance for Design
This section needs some ❤️
Contribute via Github
In the meantime, see the W3C's detailed explanation of this guideline with techniques and examples.
Guidance for Web
This section needs a review and more content. Contribute via Github.
In the meantime, see the W3C's detailed explanation of this guideline with techniques and examples.