Resize Text
Text has to survive being enlarged to 200% without losing content or function. That means no fixed pixel heights around text, and no boxes that clip when their contents grow.
- Principle
- Perceivable
- Guideline
- 1.4
- Level
- AA
- In WCAG since
- 2.0
- Number
- 1.4.4
Broken, then fixed
The same interface twice: first with the mistake, then with the smallest change that fixes it.
A fixed-height box clips its own text when enlarged.
Each box is held at the width and height its text had as designed, in px, with overflow: hidden. At 200% the sentence is cut off and the reader never learns there was more.
The box grows with its contents.
No width or height of its own and no overflow clipping, so each box grows with its text. Sizing in rem rather than px also makes text follow the reader’s own browser setting.
What changed in the code
The fix as a diff: removed lines are marked with a minus, added lines with a plus.
.notice__body,
.notice__tag {
removed: width: var(--designed-width); /* px, as laid out at 100% */
removed: height: var(--designed-height);
removed: overflow: hidden;
}
Each box was locked at the size its text had as designed. Take the lock off and the box grows with its text: almost every resize failure is a fixed size or clipped overflow.
How to test
Check your own interface against 1.4.4, one step at a time.
- Set the browser window to about 1280px wide and zoom in (Ctrl and + on Windows, Cmd and + on a Mac) until the zoom level shows 200%.
- Read the whole page at 200%. Check no text is cut off, hidden behind other content or overlapping it.
- Use each control at 200%: open the menus, fill in the form fields, open any dialog. Check you can still reach and use everything, and that the text in form fields grew too.
- Check the steps on the way, such as 150%, for anything that breaks only at that size.
- In Firefox, try View > Zoom > Zoom Text Only at 200%. Text-only zoom is not required, but it shows up boxes with a fixed height that clip their text.
Common questions
Is browser zoom enough to pass 1.4.4?
Yes, when the page works at 200% with it. Text has to resize to 200% by one way browsers support, and full-page zoom is one. You do not need a text size control of your own.
Does horizontal scrolling at 200% fail 1.4.4?
No, not by itself. 1.4.4 fails when text or controls are lost. 1.4.10 Reflow is the criterion that limits scrolling in two directions, at 320 CSS pixels wide.
Do captions and images of text have to resize?
No. Both are exempt from 1.4.4, though real text is still the better choice, because images of text blur when they are enlarged.
Try it yourself
A lab is a small working piece of interface that you change yourself. Read its steps, use the controls under it, and watch the verdict line at the bottom: it says whether the criterion passes or fails as you go. Reset puts it back.
Try it: text to 200%
How to use this lab
- Goal. Make the notice card’s text twice as large and keep all of it readable.
- The controls. The choices under “Text size” set the card’s text to 100%, 150% or 200%. The choices under “Boxes” make its boxes Locked in px, fixed at the size they were designed at, or Flexible, so they grow with the text. The readouts give the body text size and say whether all the text fits.
- Try this. The lab starts at 100% with Locked in px, and passes. Choose 200% and watch the text get cut off. Then choose Flexible.
- What it means. If the text can grow to 200% and every box still shows all of it, 1.4.4 passes. If larger text is cut off by a box locked in px, 1.4.4 fails: people with low vision who enlarge text lose some of it. The verdict line under the lab says which.
- 16pxbody text size
- All the text fitsEvery box shows all of its text
1.4.4 passes
Also in guideline 1.4
Criteria in the same guideline often fail together.
- 1.4.1, PerceivableLevel A
Use of Color
Fails when: Hue is the only signal.
- 1.4.2, PerceivableLevel A
Audio Control
Fails when: Autoplaying audio with no control on the page.
- 1.4.3, PerceivableLevel AA
Contrast (Minimum)
Fails when: Hierarchy built by fading text out.
- 1.4.5, PerceivableLevel AA
Images of Text
Fails when: A headline exported as an image.
- 1.4.10, PerceivableLevel AA
Reflow
Fails when: Fixed-width columns make the page scroll sideways as well as down at 320px wide.
- 1.4.11, PerceivableLevel AA
Non-text Contrast
Fails when: The field and checkbox edges vanish; only the placeholder hints anything is editable.