text-spacing
Mobile validation
Dense text is hard to read for people with low vision, dyslexia, or attention deficit disorders. When spacing is tight, words and lines blend together. Don't reduce the letter spacing or word spacing below the font's defaults, and set the line height to at least 1.15 times the text size.
Note: This validation maps to SC 1.4.12 Text Spacing. That criterion is about users being able to adjust text spacing without losing content. Unlike web browsers, mobile operating systems do not let users adjust text spacing, so this validation checks instead that the app's own spacing stays readable.
Pass Patterns
Android
XML Views
The text keeps the font's default letter spacing, and its line height, 20sp, is 1.25 times its 16sp text size.
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Your order will arrive within three to five business days."
android:textSize="16sp"
android:lineHeight="20sp" />The word spacing is left at the font's default, so it is not set in code.
deliveryText.text = "Your order will arrive within three to five business days."Fail Patterns
Android
XML Views
The negative letterSpacing squeezes the letters together, and the line height, 14sp, is less than the 16sp text size.
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Your order will arrive within three to five business days."
android:textSize="16sp"
android:letterSpacing="-0.05"
android:lineHeight="14sp" />The negative word spacing, available from Android 10, squeezes the words together.
deliveryText.text = "Your order will arrive within three to five business days."
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
deliveryText.paint.wordSpacing = -4f
}Try It Yourself
Reading the text
- Open a screen with a block of text that wraps across several lines.
- Read the text, and check whether letters, words, and lines are easy to tell apart.
Expected results: Letters, words, and lines are clearly separated, and the text is easy to read.
Actual results: Letters or words run together, or lines are so close that they touch or overlap.
Using developer tools
- In Android Studio, open the Layout Inspector and select the text.
- Check its
letterSpacingandlineHeightattributes, and compare the line height with the text size.
Expected results: The letter spacing is not negative, and the line height is at least 1.15 times the text size.
Actual results: The letter spacing is negative, or the line height is less than 1.15 times the text size.
FAQ
How does this issue relate to 1.4.12 Text Spacing?
SC 1.4.12 requires that no content or functionality is lost when users increase the spacing of text. Mobile operating systems do not let users adjust text spacing, so users depend entirely on the spacing the app provides. This validation therefore checks a readable baseline instead: spacing no tighter than the font's defaults, and a line height of at least 1.15 times the text size.
Why is this issue marked as Serious?
Tight spacing makes text harder to read, especially for people with low vision or dyslexia, and on mobile, users cannot adjust it themselves. The text usually remains readable with extra effort, so it rarely blocks a task, and it is rated serious.
Standards and Regulations
| Standard | Success Criterion | Reference |
|---|---|---|
| WCAG 2.2 | 1.4.12 Text Spacing (AA) | No loss of content or functionality occurs when a user sets line height, paragraph spacing, letter spacing, and word spacing to specified minimum values. |
| EN 301 549 | 11.1.4.12 Text Spacing | Same as the WCAG text. |