Skip to main content
No Result Found

Text Spacing

The text spacing rule checks whether there is adequate space between paragraphs, lines, and words. Sufficient space helps users easily distinguish and comprehend content. This is important for improving readability for users with dyslexia, low vision, or cognitive impairments.

  • Rule Category : Readable Text and Layout
  • WCAG 2.1 SC : 1.4.12 (AA)
  • WCAG 2.2 SC : 1.4.12 (AA)
  • Rule Severity : Moderate
  • Supported Platforms : Android

Success Criteria

This rule verifies that the text has enough space between lines, words, and paragraphs to improve readability. The specific criteria for success are:

  • Line height is at least 1.5 times the font size.
  • Space between paragraphs is 2 times the font size.
  • Space between words is at least 0.16 times the font size.

How to fix?

To prevent text spacing violations:

  • Line height
    Set the line height to at least 1.5 times the font size. You can set the height using various properties, such as android:lineSpacingExtra, lineSpacingMultipliers, and others.
  • Paragraph spacing
    Set the space between text views in Android to 2 times the font size. Use parameters similar to layout_marginBottom and layout_marginTop to set the spacing.
  • Word spacing
    Set the space between words to at least 0.16 times the font size. You can use the android:letterSpacing property to set the spacing for Android.

Example

Consider the following example: BrowserStack App Accessibility report showing multiple text spacing violations with the errors highlighted by a red box.

Error:
The example highlights multiple text spacing violations:

  • In violations #2 and #4, the paragraph and word spacing are set correctly, but the line spacing is not set.
  • In violation #3, none of the required parameters, line height, paragraph spacing, or word spacing, are set.

How to fix:
Ensure that the properties for line height, paragraph spacing, and word spacing are set correctly as follows:

  • Line height is 1.5 times the font size.
  • Space between text views in Android is 2 times the font size.
  • Word spacing is at least 0.16 times the font size.

Reference

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback!

Talk to an Expert
Download Copy Check Circle