CSS letter-spacing: The Right Way to Space Characters

Patricia
digitalwcagcssscreen readersweb accessibility

Patricia · AI Research Engine

Analytical lens: Risk/Legal Priority

Government compliance, Title II, case law

AI-assisted · Source-linked · Editorially reviewed · Methodology

Trust note

This article was drafted with AI assistance, reviewed against accessibility.chat editorial standards, and should be treated as research and education rather than legal advice. We prioritize primary sources and correct material errors.

Close-up of hands holding a diabetic glucometer kit on a white table for blood sugar testing.
Photo by Artem Podrez on Pexels

A blank space inserted between characters looks harmless. To a screen reader, it's a different word — or nonsense. The word "Museum" becomes "M u s e u m" — six separate tokens, pronounced individually, stripped of meaning. WCAG Technique C8 (opens in new window) exists because this specific mistake is both common and entirely preventable with a single CSS property.

The Technique

Technique C8 describes using the CSS letter-spacing property to control visual spacing between characters — instead of inserting blank characters (spaces, non-breaking spaces, zero-width spaces) directly into the HTML text content.

The W3C's official formulation is precise: the technique demonstrates "how the visual appearance of spacing in text may be enhanced via style sheets while still maintaining meaningful text sequencing." That phrase — meaningful text sequencing — connects directly to WCAG 2.1 Success Criterion 1.3.2: Meaningful Sequence (opens in new window), which requires that when the sequence of content affects meaning, that sequence be programmatically determinable.

The canonical example from the W3C source is straightforward:

CSS
h2 {
letter-spacing: ;
}
HTML
<h2>Museum</h2>

This renders visually as M u s e u m — wide, airy, typographically intentional. But the underlying text node remains Museum. Screen readers read one word. Search engines index one word. Copy-paste produces one word. The visual effect is achieved; the semantic integrity is preserved.

Contrast that with the problematic pattern this technique replaces:

HTML
<h2>M u s e u m</h2>

Or worse:

HTML
<h2>M&nbsp;u&nbsp;s&nbsp;e&nbsp;u&nbsp;m</h2>

Same visual output. Completely different accessibility outcome.

Why This Matters

The failure mode here isn't subtle. When characters are separated by actual space characters in the DOM, assistive technologies treat each letter as a discrete text unit. A screen reader using a natural language processing engine may attempt to pronounce each character individually — "em, you, es, ee, you, em" — or pause between each, destroying the word's pronunciation and comprehensibility.

For users who rely on text-to-speech, this isn't an inconvenience. It's a comprehension failure. Headings, labels, brand names, and calls to action rendered this way become actively misleading. A visually impaired user navigating by heading landmarks encounters what sounds like a random string of letters rather than a meaningful section title.

The impact extends beyond screen reader users. Users who copy text from a page and paste it into a search field or document get the spaced version — broken, unsearchable, wrong. Voice control users attempting to click a link or button by speaking its label may find no match, because the spoken word doesn't correspond to the fragmented text string.

C8 is listed as sufficient for SC 1.3.2 Meaningful Sequence (opens in new window) when combined with G57 (ordering content in a meaningful sequence), and advisory for SC 1.4.5 Images of Text (opens in new window), SC 1.4.9 Images of Text (No Exception) (opens in new window), and SC 1.4.12 Text Spacing (opens in new window). The advisory relationship to 1.4.12 is particularly relevant: using CSS for spacing rather than embedded characters means users can override spacing through user stylesheets without breaking the underlying text — which is exactly what SC 1.4.12 is designed to protect.

How It Works

The mechanics are simple. letter-spacing accepts any valid CSS length value — em, rem, px, %. Using relative units like em is generally preferable because spacing scales proportionally with font size, maintaining visual relationships when users increase text size.

CSS
/* Preferred: relative units scale with font size */
h2 {
letter-spacing: 0.;
}
/* Acceptable for fixed layouts, but doesn't scale */
.spaced-label {
letter-spacing: ;
}
/* Negative values tighten spacing — also valid */
.condensed {
letter-spacing: -0.;
}

The key principle: the visual presentation lives in CSS; the semantic content lives in HTML. This separation is foundational to accessible web development, not a special accommodation for edge cases.

Applying This

For development teams, C8 violations are partially catchable through automated testing — specifically, tools that flag non-breaking spaces or sequences of single-character text nodes within heading or label elements. However, as the research in Beyond Detection: Why Context Separates Automated Testing from Manual Audits makes clear, automated tools capture a fraction of real accessibility barriers. This particular pattern requires a code review eye.

In code review, watch for:

  • Heading or label text with spaces between every character
  • &nbsp; entities used for visual spacing within words
  • Text content that looks deliberately spaced in the HTML source

In design handoff, flag any design that calls for widely-spaced letterforms. Designers working in Figma or similar tools may not realize that developers sometimes implement this with character injection rather than CSS. Making the correct implementation explicit in design specs prevents the problem upstream.

In content management systems, this pattern sometimes appears in WYSIWYG editors where content authors manually space out text for visual effect. A letter-spacing CSS class applied to specific heading styles — rather than allowing free-form spacing in the editor — closes this gap at the authoring layer.

Automated linting can catch some instances. An ESLint rule for JSX or an HTML linter configured to flag single-character text nodes in sequence within heading elements will surface the most obvious cases. But manual review remains the reliable catch.

CORS Perspective

From a risk and legal priority standpoint, C8 violations sit in an interesting position: they're low-profile individually but systematically common in organizations where design and development handoff lacks accessibility guardrails. A single spaced heading on a homepage isn't a litigation trigger. A pattern of spaced headings, labels, and UI elements across a product — discovered during a DOJ investigation or plaintiff's expert review — becomes evidence of systemic failure to consider assistive technology users. The fix is trivial (one CSS property); the organizational signal it sends about process maturity is not. Teams that implement this correctly aren't just avoiding a WCAG failure — they're demonstrating that the separation of presentation and semantics is understood and enforced, which is the foundation on which sustainable compliance is built.

About the Patricia lens

A risk and legal lens. Frames findings around regulatory exposure, drawing on Title II obligations, published case law, and government compliance requirements.

Patricia is an AI analyst lens, not a human staff member. It helps frame this article through a consistent accessibility perspective.

Specialization: Government compliance, Title II, case law

View all articles using this lens →

Transparency Disclosure

This article was drafted with AI assistance and reviewed against our editorial methodology. We disclose that process so readers can judge the work clearly.