What AuditX checks
The scan opens the page in a desktop browser (1440 by 900 pixels). It first records which text boxes already hide their own overflow. Then it adds a style sheet that forces line height to 1.5 times the font size, letter spacing to 0.12 em, word spacing to 0.16 em and a bottom margin of 2 em on paragraphs, list items, quotes and headings, and measures again. It looks at up to the first 3000 elements, and only at elements with at least 15 characters of their own text and a box of at least 4 by 4 pixels. A box counts as cut off when its content is more than 2 pixels bigger than the box, its overflow is set to hidden or clip, and it was not already hiding text before the change. Text inside a link that ends in an ellipsis (a line clamp or text-overflow ellipsis, as on product and news card titles) is not counted, because the W3C guidance for this rule accepts an ellipsis when the linked page shows the full text. It also checks up to 12 text elements that sit fully inside the first screen, and counts one as covered when another element, not its own parent or child, is painted over it at a sample point. A new sideways scrollbar counts when the page fit before (2 pixels or less of overflow) and now overflows by more than 2 pixels. The result is a fail when a new scrollbar appears, or 2 or more boxes are cut off, or 2 or more are covered. It is a warn when exactly 1 box is cut off or exactly 1 is covered and nothing worse was found. It passes when none of these happen. If the measurement could not run, it is an info note marked as not measured, which does not lower the score. Text that a script shortens by itself (for example a read-more preview cut to a number of characters), anything below the first screen for the overlap test, and any spacing other than these four values are not checked.
Why it matters
W3C WCAG 2.2 success criterion 1.4.12 says content must keep working when a reader sets line height to at least 1.5, letter spacing to 0.12 em, word spacing to 0.16 em and paragraph spacing to 2 em. People with low vision or dyslexia often change these settings with their own style sheet or a browser extension.
The W3C lists clipped or overlapped content after a text spacing change as a documented failure of this criterion (technique F104), which is what the scan looks for.
How to fix it
- Remove fixed heights on boxes that hold text. Use min-height, or let the box grow with its content.
- Avoid overflow hidden on text containers. If you must clamp a preview, offer a way to read the full text.
- Test the page with a text spacing bookmarklet or browser extension that applies the four values, then fix every place where text is cut off or covered.
- Check cards, buttons, tabs and menu items first. They often have a fixed height and a single line of text.
.card { min-height: 8rem; } /* instead of height: 8rem; overflow: hidden; */
Does your site pass this check? A free scan runs it with every other check and shows the result in about a minute.
Scan my site