Skip to main content
Browse documentation

Text Spacing Audit

WCAG 1.4.12 Text Spacing requires that people can override a page’s line height, paragraph spacing, letter spacing, and word spacing up to defined minima without losing content or functionality. People with low vision and dyslexia do this with custom stylesheets, reader extensions, or browser settings. Pages with fixed-height boxes or overflow: hidden containers often respond by clipping or overlapping text.

Most accessibility engines only look for inline !important spacing styles that would block a user’s override. This audit applies the override and looks at what happens.

Turning it on

This audit is experimental: it is off by default while we validate it against more real-world sites. To enable it, open a site’s Settings, and switch on Include experimental audits under Scan settings. The setting is per-site, and applies to every scheduled and manual scan of that site from the moment you save it.

How the audit works

After the page has loaded, the audit:

  1. Measures visible text containers at the page’s default spacing.
  2. Injects a stylesheet with the WCAG 1.4.12 minima: line height 1.5, paragraph spacing 2em, letter spacing 0.12em, and word spacing 0.16em.
  3. Re-measures the same containers.
  4. Removes the stylesheet and checks that the page is restored.

Growth by itself is not a failure. Reflow is the correct response to increased spacing. The audit flags text that is newly clipped, newly more truncated, or newly overlapping.

Reading the results

Violations are the strongest signal: a text container that fitted at default spacing and is now clipped inside an overflow: hidden or clip box.

Incomplete results are cases the audit will not assert as failures: truncation that was already present and got worse, or text that now overlaps another element. Overlap detection is heuristic, so those findings never land in violations.

Passes mean the page had text containers to measure and none of them clipped, truncated further, or overlapped under the override.

If the page has no visible text containers, the audit stays silent.

Both passing and failing results include CSS selectors and a sample of the element’s HTML when a finding is identified. You can ignore individual elements you have reviewed and accepted using the same ignore feature you use for other issues.

Complement to axe-core

axe-core’s avoid-inline-spacing rule still runs. It answers whether a user’s spacing override could even apply. This audit answers whether content survives once the override does apply. The two checks look at different defects: inline !important spacing, versus containers that clip or overlap under a real override.

Limitations

The audit covers the load-time state of the main frame at the scan viewport. It does not judge whether clipped content was meaningful, whether functionality survived, or how the page behaves at other widths or in hover and focus states.

Elements with inline !important spacing resist the injected stylesheet; axe-core covers that case. Text in canvas, images, or cross-origin iframes is invisible to the scan. Closed shadow roots are opaque.

Intentional single-line ellipsis and line-clamp truncation are clipped by design. Those elements are never promoted to violations; if truncation increases, they route to incomplete.