WCAG 1.4.12 Text Spacing — Testing Guide for Mobile & Web Apps

WCAG 1.4.12: Text Spacing Compliance Guide

May 04, 2026 · 6 min read · WCAG Guides

WCAG 1.4.12: Text Spacing Compliance Guide

Understanding WCAG 1.4.12: Text Spacing

WCAG 1.4.12, Text Spacing, requires that users can adjust text spacing without loss of content or functionality. Specifically, assistive technologies or user preferences should be able to override default text spacing settings to a reasonable degree. This means the application must accommodate:

These adjustments should not cause text to overlap, be cut off, or become unreadable. The core principle is that users who need wider spacing for readability should not be penalized with a broken user experience.

Why Text Spacing Matters: User Impact

This criterion directly benefits users with a range of cognitive and visual needs.

Failure to meet this criterion can render your application effectively unusable for a significant portion of your user base, potentially leading to non-compliance with legal mandates like the EU's European Accessibility Act (EAA) and the U.S. Americans with Disabilities Act (ADA).

Common Violations and Examples

Violations of WCAG 1.4.12 often stem from fixed layouts or hardcoded spacing values that don't adapt to user-defined text styles.

#### Mobile App Violations

  1. Overlapping Text in Profile Summaries:
  1. Truncated or Hidden Action Buttons:

#### Web App Violations

  1. Clipped Text in Navigation Menus:
  1. Unreadable Form Labels and Input Fields:
  1. Overlapping Content in Tables:

Testing for WCAG 1.4.12 Compliance

A multi-pronged approach combining manual checks and automated tools ensures comprehensive coverage.

#### Manual Testing Steps

  1. Enable Text Spacing Adjustments:
  1. Navigate and Interact: Thoroughly browse through your application, focusing on areas with significant text content, forms, menus, and lists.
  1. Observe for Overlap and Truncation: Pay close attention to:
  1. Test Critical Flows: Specifically test login, registration, checkout, search, and any other user journeys that are essential for core functionality.

#### Automated Tools

While manual testing is crucial for nuanced observation, automated tools can quickly identify potential issues.

#### Mobile-Specific Considerations

Fixing WCAG 1.4.12 Violations

The solution typically involves using relative units and flexible layout techniques.

#### Code Examples

Web (CSS):

Avoid fixed line-height and padding on elements containing text. Use relative units:


/* Bad: Fixed line height */
.article-content p {
  line-height: 20px; /* Problematic */
}

/* Good: Relative line height */
.article-content p {
  line-height: 1.5; /* 1.5 times the font-size */
}

/* Bad: Fixed paragraph spacing */
.article-content p + p {
  margin-top: 5px; /* Problematic */
}

/* Good: Relative paragraph spacing */
.article-content p + p {
  margin-top: 0.1em; /* 0.1 times the font-size */
}

/* Bad: Fixed letter spacing */
h1 {
  letter-spacing: -1px; /* Problematic */
}

/* Good: Relative letter spacing */
h1 {
  letter-spacing: 0.05em; /* Adjust as needed, but relative */
}

Mobile (Android - XML Layouts):

Ensure TextView and other text elements use wrap_content for height and avoid hardcoded padding that could cause overlap when system font scaling is applied.


<!-- Bad: Fixed height, hardcoded padding -->
<TextView
    android:layout_height="50dp"
    android:padding="8dp"
    android:text="User comment..." />

<!-- Good: Flexible height, relative padding -->
<TextView
    android:layout_height="wrap_content"
    android:padding="8dp" <!-- dp units are generally okay, but consider if they interact poorly with scaling -->
    android:text="User comment..." />

Mobile (iOS - Storyboards/SwiftUI):

Use Auto Layout constraints that prioritize content size and avoid fixed heights. For UILabel in UIKit, ensure numberOfLines is set to 0 and lineBreakMode is appropriate. In SwiftUI, use .lineSpacing() and ensure containers are flexible.


// UIKit Example
let label = UILabel()
label.numberOfLines = 0 // Allows text to wrap to multiple lines
label.lineBreakMode = .byWordWrapping // Standard word wrapping
label.text = "This is a long label that needs to wrap..."

How SUSA Checks WCAG 1.4.12

SUSA (SUSATest) autonomously explores your application, simulating diverse user interactions and configurations. During its exploration, SUSA specifically targets WCAG 1.4.12 by:

  1. Simulating User Persona Needs: SUSA includes personas like "Elderly" and "Accessibility" that are configured with increased text scaling, larger font sizes, and wider spacing preferences.
  2. Dynamic Exploration: As SUSA navigates screens, it dynamically applies these text spacing adjustments.
  3. Content Analysis: SUSA analyzes the rendered UI for overlapping text, truncated content, and elements that become inaccessible due to spacing changes.
  4. Flow Tracking: Critical user flows (login, checkout, etc.) are monitored to ensure they remain functional and all content is visible even with adjusted text spacing.
  5. Violation Reporting: SUSA identifies and reports specific instances where text spacing adjustments lead to usability issues, including screenshots and detailed descriptions, flagging them as accessibility violations.
  6. Regression Script Generation: For web applications, SUSA auto-generates Playwright scripts, and for Android, Appium scripts. These scripts can be configured to include checks for text spacing issues, ensuring that future regressions are caught.

By integrating SUSA into your QA process, you gain an automated, persona-driven approach to identifying and rectifying WCAG 1.4.12 violations, ensuring your application is accessible to

Test Your App Autonomously

Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.

Try SUSA Free