1 Why this criterion exists
Many people with low vision, dyslexia, or other reading disabilities rely on adjusting text spacing to make content legible. They may increase line height, letter spacing, word spacing, or space between paragraphs using browser settings, user stylesheets, or assistive technology. When a website’s layout is built with fixed dimensions or absolute units, these adjustments can cause text to overflow, overlap, or become clipped, rendering the content unreadable. The Web Content Accessibility Guidelines (WCAG) introduced Success Criterion 1.4.12 Text Spacing to ensure that users can apply their own spacing preferences without breaking the page.
This criterion is part of the Perceivable principle, specifically under Guideline 1.4 Distinguishable, which deals with making it easier for users to see and hear content. Text spacing is a subtle but critical aspect of visual accessibility. Unlike zoom, which scales everything uniformly, text spacing adjustments target the readability of text blocks by altering the whitespace between characters, words, lines, and paragraphs. The criterion does not require that a site provide its own spacing controls; rather, it requires that the site tolerate user overrides. This aligns with the broader WCAG philosophy of designing for flexibility and respecting user preferences.
The criterion was added in WCAG 2.1 to address a gap: even if text could be resized, users still faced barriers when spacing changes caused layout breakage. By mandating that content and functionality remain intact when spacing is increased to specific thresholds, WCAG ensures that people who need these adjustments can actually use the web. It’s a recognition that accessibility is not just about making things bigger, but about making them adaptable to individual needs.
2 Who it protects
The primary beneficiaries of Success Criterion 1.4.12 are individuals with low vision who may not use screen magnification but instead adjust text spacing to improve readability. For many, increasing line height and letter spacing reduces visual crowding, making it easier to track lines and distinguish letters. People with dyslexia often find that increased spacing between letters and words reduces the “swimming” effect of text, where characters appear to move or blur. Similarly, individuals with cognitive disabilities such as attention deficit hyperactivity disorder (ADHD) or autism may benefit from more whitespace to focus on content.
Screen reader users can also be affected, though indirectly. Some screen readers allow users to customize the visual presentation of text in braille displays or on-screen, and if the underlying page cannot accommodate those changes, the reading experience may be disrupted. Moreover, many screen reader users have some residual vision and may use both speech and visual adjustments. When text spacing overrides cause content to overlap, it can also confuse screen readers if the DOM order becomes visually disconnected from the rendered layout, though screen readers typically rely on the accessibility tree rather than visual rendering.
It’s important to note that this criterion is not about catering to a niche group. The need for adjustable text spacing is widespread among people with various print disabilities. By designing for this flexibility, developers also improve the experience for anyone who prefers a more spacious reading environment, such as people reading on small screens or in bright sunlight. The criterion thus embodies the curb-cut effect: solutions for disabled users often benefit everyone.
3 How conformance is measured
To conform to Success Criterion 1.4.12 at Level AA, content must remain readable and functional when users override text spacing to at least the following values: line height (leading) to 1.5 times the font size, spacing following paragraphs to 2 times the font size, letter spacing (tracking) to 0.12 times the font size, and word spacing to 0.16 times the font size. These thresholds are not arbitrary; they represent a reasonable increase that many users find helpful. The criterion does not require that the site itself set these values, only that it does not prevent users from achieving them.
Conformance is measured by applying these spacing overrides and checking that no loss of content or functionality occurs. Specifically, text must not be clipped, truncated, or overlapped by other elements. All content must remain visible and operable. This applies to all text on the page, including headings, labels, and interactive elements. Note that the criterion allows for some exceptions: if the user’s spacing adjustments cause horizontal scrolling for languages that are read horizontally, that is acceptable, but vertical scrolling should not be introduced for horizontal text. Also, images of text are exempt, but they should be avoided anyway.
The measurement is typically done manually, as automated tools cannot fully assess visual overlap or clipping. However, some automated accessibility checkers can flag potential issues, such as fixed heights on text containers or the use of absolute units. The WCAG working group provides a bookmarklet that applies the required spacing, making it easier to test. It’s crucial to test with actual content, not just placeholders, because different text lengths and languages can reveal different breakages.
4 Where teams usually slip
One of the most common pitfalls is the use of fixed heights on containers that hold text. For example, a button with a fixed height may clip its label when line height increases. Similarly, navigation menus with fixed-height items can overlap when letter spacing expands. Teams often set heights to achieve pixel-perfect designs, not realizing that this breaks when users adjust spacing. Another frequent issue is the use of absolute units like pixels for font sizes and spacing. While pixels are not inherently bad, they don’t scale with user preferences as fluidly as relative units like em or rem. When users increase text spacing, pixel-based layouts may not adapt, leading to overflow.
Overflow hidden is another culprit. Developers sometimes use overflow: hidden to crop content that exceeds a container, which can hide text when spacing increases. This is especially problematic in cards, list items, or table cells. Similarly, using white-space: nowrap can prevent text from wrapping, causing it to extend beyond its container and overlap other elements. Flexbox and grid layouts can also cause issues if items are not allowed to grow; for instance, a flex item with a fixed basis may not expand to accommodate increased line height, causing text to spill out.
Another subtle mistake is relying on background images or CSS shapes to contain text. When spacing changes, text may extend beyond the background, becoming unreadable against the page background. Teams also forget to test with actual user stylesheets or browser extensions that modify spacing. They might test with zoom, which scales everything, but zoom is different from spacing adjustments. Finally, some teams assume that because their site passes automated checks, it’s fine, but automated tools cannot detect visual overlap. Manual testing with the WCAG text spacing bookmarklet is essential.
5 Fixing it in your markup
The foundation of a robust fix is to use relative units for typography and spacing. Set font sizes in rem or em, and define line-height as a unitless multiplier (e.g., line-height: 1.5) so it scales with the font size. Use em for margins and padding around text elements, especially for paragraph spacing. Avoid setting fixed heights on any element that contains text; instead, use min-height if necessary, or let the container grow with its content. For buttons and form controls, use padding to create size rather than fixed heights, and ensure that text can wrap if needed.
When using Flexbox or Grid, allow items to grow and wrap. For flex items, avoid setting flex-shrink: 0 unless you have a good reason; instead, allow them to shrink and grow as needed. Use flex-wrap: wrap on containers to let items move to the next line when space is tight. For grid, use auto-placement and avoid fixed track sizes that cannot accommodate larger text. If you must use overflow, prefer overflow: auto or overflow: visible over overflow: hidden, so content is not lost. However, be cautious with overflow: auto as it may introduce scrollbars; test to ensure it doesn’t create a poor experience.
Avoid using white-space: nowrap on text that could be long. If you need to prevent wrapping for short labels, consider using it sparingly and test with increased spacing. For images of text, replace them with actual text styled with CSS. Use CSS custom properties to define spacing values that can be easily adjusted. Finally, consider adding a user style sheet or a settings panel that allows users to adjust spacing directly on your site, though this is not required by the criterion. The key is to build with flexibility in mind, so that user overrides do not break the layout.
6 Testing before you ship
Manual testing is the most reliable way to ensure conformance to Success Criterion 1.4.12. Start by installing the WCAG Text Spacing bookmarklet, which applies the required spacing overrides with a single click. Alternatively, you can manually adjust spacing using your browser’s developer tools: set line-height to 1.5, paragraph spacing to 2em, letter-spacing to 0.12em, and word-spacing to 0.16em on the body or relevant elements. Then, inspect the page for any content that is clipped, truncated, or overlapped. Pay special attention to interactive elements like buttons, links, and form fields, as well as headings and navigation menus.
Test across different viewport sizes, from mobile to desktop, because spacing issues may only appear at certain widths. Also test with different languages if your site is multilingual, as some languages have longer words or different line-breaking rules. Use a screen reader in combination with spacing overrides to ensure that the reading order and functionality remain intact. While screen readers don’t rely on visual layout, some users may use both, and overlapping content can sometimes cause confusion if the visual and DOM order diverge.
Automated tools can help identify potential issues, such as fixed heights or absolute units, but they cannot catch visual overlap. Use tools like axe or Lighthouse to flag common problems, then follow up with manual checks. Incorporate text spacing tests into your regression testing suite, especially after design changes. Consider adding a CSS class that simulates the spacing overrides for easy testing during development. Finally, document your testing process and share it with your team to build awareness. By making text spacing a standard part of your QA checklist, you ensure that your site remains accessible to users who need these adjustments.
7 Frequently asked questions
Does this criterion require me to provide a text spacing adjustment tool on my site? No, it does not. The criterion only requires that your content remains readable and functional when users apply their own spacing overrides via browser settings, user stylesheets, or assistive technology. You are not required to build a custom control, though doing so can be a nice enhancement.
What about responsive design? Doesn’t that already handle spacing? Responsive design focuses on adapting layout to different screen sizes, but it does not necessarily account for user-initiated spacing changes. A layout can be perfectly responsive at various widths yet still break when line height or letter spacing is increased. Text spacing overrides are independent of viewport size, so you must test them separately.
Are there any exceptions? Yes, the criterion has some exceptions. For example, if the user’s spacing adjustments cause horizontal scrolling for languages that are read horizontally, that is acceptable. Also, images of text are exempt, but they should be avoided for other accessibility reasons. Additionally, if a particular text spacing adjustment would fundamentally alter the meaning or functionality, it might be exempt, but such cases are rare.
How does this relate to zoom? Zoom scales everything, including images and layout, while text spacing adjustments only affect the spacing of text. They are complementary. A site should support both. Zoom is covered by Success Criterion 1.4.4 Resize Text, while text spacing is covered by 1.4.12.
Can I use pixels for font sizes? You can, but it’s better to use relative units like rem or em to ensure that text scales with user preferences. If you use pixels, users can still override spacing, but the layout may be more fragile. The key is to avoid fixed dimensions that prevent text from expanding.
What if my site is a web application with complex components? The criterion applies to all web content, including applications. You may need to adjust component libraries to allow for flexible sizing. Testing with real user scenarios is crucial. Remember, the goal is to ensure that users who need spacing adjustments can access and use your content effectively.