Text Spacing Bookmarklet for WCAG 1.4.12 Testing
Builds a bookmarklet and CSS that apply the WCAG text spacing values to any page.
Use the tool
Why this tool exists
WCAG 1.4.12 requires that content survives user-set text spacing. The quickest check is to apply the values and look.
The bookmarklet injects one style element with the spacing values from the W3C text and toggles it on a second click. Look for clipped text, overlap and lost controls. You can change the numbers if you want to test beyond the minimum.
How to use it
- Keep the defaults or edit the values.
- Create a bookmark with the generated URL, or use the CSS in DevTools.
- Open your page and click it.
- Look for cut-off text and overlap.
Frequently asked questions
What are the required values?
Line height 1.5, paragraph spacing 2, letter spacing 0.12 and word spacing 0.16, all times the font size.
Must my page use these values?
No. It must still work when a user applies them.
Why does it not work on some sites?
A strict Content-Security-Policy can block the bookmarklet. Paste the CSS in DevTools instead.
Does anything leave the page?
No.