liveBook · Manning

Text scaling

As explained in Architecting Accessibility

Text scaling is enlargement or reduction of text through browser or operating-system text-size settings, with text growing along with its container.

People who need larger text should be able to enlarge it through browser or operating-system settings without losing content or functionality. Pinch-to-zoom alone is not enough: text scaling enlarges text along with its container, such as a button. section 4.4

Use relative font-size units such as rem, em, or percentages so text can respond to user preferences. Keep containers flexible and avoid hiding essential text with clipping or ellipses unless users can access the full value another way. section 4.4 section 4.4.1

Compare font sizing

A root size of 100% with body text at 1rem and headings at 2rem follows the browser’s default font preference. Fixed sizes such as 16px and 24px are generally less adaptable. section 4.4.1

:root { font-size: 100%; } #A
body { font-size: 1rem; } #B
h1 { font-size: 2rem; } #C

This CSS example shows a browser-default root size and text sizes defined relative to it. section 4.4.1

Try the largest browser font-size setting and check that text remains visible, controls usable, and content accessible without scrolling in both directions. WCAG 2.2 Success Criterion 1.4.4 calls for resizing text up to 200% without loss of content or functionality. section 4.4 section 4.4.1

How Architecting Accessibility covers it

How deep it goes
Defines text scaling, gives relative-unit guidance, and includes a browser-setting test with layout checks.
Examples
Compares rem-based sizing with fixed-pixel CSS and tests the largest browser font-size setting.
What you can do after
Evaluate text scaling by checking visibility, functionality, and scrolling at the largest browser font-size setting.
How it connects
Connects text scaling with browser zoom, relative CSS units, responsive layouts, and reflow.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Architecting Accessibility. The section links point to the parts of the book it draws on.