Text Spacing and Zoom for Low Vision Users
People with low vision, dyslexia, or just tired eyes often adjust how a page looks: zooming in, increasing the browser's text size, or changing line and letter spacing. Your layout needs to survive these changes. If it does not, text overlaps, gets cut off, or disappears.
What WCAG expects
Several success criteria cover this:
- Resize Text (1.4.4, AA): text can be resized up to 200% without loss of content or function, without assistive technology
- Reflow (1.4.10, AA): content should reflow at a width equivalent to 320 CSS pixels (a 400% zoom on a typical desktop window) without needing to scroll in two directions, with exceptions for things like data tables and maps that need two-dimensional layout
- Text Spacing (1.4.12, AA): if a user sets certain spacing values, no content or functionality is lost. The values are line height of at least 1.5 times the font size, paragraph spacing of at least 2 times, letter spacing of at least 0.12 times, and word spacing of at least 0.16 times the font size
- Non-text Contrast (1.4.11, AA) and Use of Color also help low vision users
Design choices that help
- Use relative units. Set font sizes in
remoremrather than fixed pixels, so the browser's text size setting works. - Build responsive layouts. If your page works on a 320 pixel phone, zoomed-in desktop views usually reflow properly too. See responsive web design basics.
- Avoid fixed heights on containers with text. Let boxes grow with content.
- Do not clip text. Be careful with
overflow: hiddenon cards, buttons, and menus. - Allow wrapping. Long words and links should wrap rather than overflow, and buttons should grow to fit labels.
- Avoid fixed-position elements that cover too much of the screen when zoomed. A sticky header that takes half the viewport at 400% zoom blocks the content.
- Do not disable zoom. Never block pinch-zoom on mobile with the viewport settings.
Choose readable type
Comfortable body text size, generous line height, and moderate line length help all readers. See readable text: font size and line length and best fonts for websites.
Mind images of text
Text inside images does not resize with the page. Use real text wherever possible. See how to use images on your website.
How to test
- Zoom to 200% and then 400% in your browser on a desktop window. Check for horizontal scrolling, overlaps, and hidden content.
- Change the browser's default font size to a larger setting and reload.
- Apply the text spacing values using a bookmarklet or browser extension designed for testing, and look for clipped text.
- Test navigation, forms, and modals under these conditions, not just the homepage. See accessible navigation menus.
See accessibility testing tools for small sites.
Common mistakes
- Fixed pixel font sizes
- Boxes with fixed heights
- Menus that break when text grows
- Disabling zoom
Testing is easier with the right tools. Read accessibility testing tools for small sites.