LAY-003a Let text grow to 200 percent without losing content or function
- Level
- Rule
- Verdict
- Requirement
- Area
- Layout
- Status
- proposed, version 1.0.0
Rule
Text, also in controls and labels, can be enlarged to 200 percent without losing content or function: nothing is cut off, laid over other content or stops working. Do not switch off zoom or cap it below 200 percent in the viewport setting, and size no text in viewport units alone.
Examples
Live examples built with Justified's components. Try them with the mouse, the keyboard or a screen reader.
Do: Cards that grow with their text
Shows the page as at 200 percent zoom.
Plot 14
South-facing, raised bed, water tap within ten metres. Tools are kept in the shed by the gate.
Herb bed
Shady corner, rich soil, close to the compost bins. Good for mint and chives.
Don't: A fixed height that clips the text
Shows the page as at 200 percent zoom.
Plot 14
South-facing, raised bed, water tap within ten metres. Tools are kept in the shed by the gate.
Herb bed
Shady corner, rich soil, close to the compost bins. Good for mint and chives.
overflow-hidden. At 100 percent all of it fits. Switch on Text size 200% and the last lines of the description are cut off, with no way to read them.Do: A banner that grows with its text
Shows the page as at 200 percent zoom.
Book a plot for the spring season
Below the banner: opening hours and the garden map.
Don't: A banner with a fixed height
Shows the page as at 200 percent zoom.
Book a plot for the spring season
Below the banner: opening hours and the garden map.
Do: The viewport setting leaves zoom alone
export const viewport = { width: "device-width", initialScale: 1 };Your plot is booked for the first Saturday in April.
Don't: A viewport setting that blocks zoom
export const viewport = { maximumScale: 1, userScalable: false };Your plot is booked for the first Saturday in April.
Why
Many people with low vision read the web at a larger size, and on the web the usual way to get there is the browser's own zoom, on a phone by pinching. The page rarely has to do anything special for this. It has to stay out of the way: let the browser zoom, let text sizes follow the zoom, and let every box that holds text grow with it. WCAG 2.2, 1.4.4 Resize Text requires that text can be resized to 200 percent without assistive technology and without loss of content or function. The page meets it when at least one way of enlarging works, and each step between 100 and 200 percent must work too. The Working Group documents the breaks this rule names: zoom switched off in the viewport setting, text sized in viewport units, and text that is clipped or overlaps once it grows. The W3C test fails a viewport setting that blocks or caps zoom whatever the browser, even though desktop browsers and most current phone browsers ignore it or let people override it. Treat it as a break, never as an old-phone detail. Browser zoom enlarges fixed heights too, but the zoomed layout is narrower, so wrapping text takes more lines and a box of fixed height clips it or lets it spill. The boxes that break are those holding text that can wrap, not one-line controls. Above 200 percent, the page must still reflow at 320 CSS pixels, which is LAY-001. What happens when people widen the spacing of text, rather than its size, is LAY-003b.
Do
- In a Next.js app, write the viewport export as
export const viewport = { width: "device-width", initialScale: 1 }and leavemaximumScaleanduserScalableout. AmaximumScaleof 5 is fine too. - Stop iOS Safari from zooming in when a field gets focus by giving the field text of at least 16 px, never by blocking zoom. Justified's
Inputalready usestext-basefor this. - Size text in
remor with Tailwind's text classes. A fluid heading such astext-[clamp(1.75rem,1.25rem+2vw,3rem)]can work, because its rem part grows with zoom. Check it at 200 percent rather than assuming it does. - In a community garden's booking app, the cards Plot 14, Plot 15 and Herb bed let their description set their height:
min-h-24instead ofh-24, padding instead of a fixed height, and grid rows that size to their content. At 200 percent the cards get taller and every line is still there. - Give a sticky header vertical padding, such as
py-3, instead ofh-14, so the page title Book a plot for the spring season can wrap onto a second line without running under the content. - Let a hero banner with text over a photo grow with its text:
min-h-[420px]with padding, noth-[420px]. - Keep toasts, popovers and tooltips free of a fixed height, so an enlarged message wraps instead of being cut.
- Test with the browser's own zoom in a window about 1280 pixels wide, at 200 percent and at the steps between, such as 125, 150 and 175. Open the menus, dialogs, popovers and toasts as well, since a closed menu hides its own breaks.
overflow-hiddenis fine where nothing but an image or a scroll area is clipped, such as a rounded photo crop, an avatar, a carousel track or a list inScrollArea.- Sizes in px are not a break on their own: browser zoom enlarges them. We still prefer
rem, so the browser's text-size setting works as well. That is our own choice.
Don't
- Write
maximumScale: 1, userScalable: falsein the viewport export, oruser-scalable=noin a hand-written meta tag inapp/layout.tsxorindex.html, to stop the zoom on focus.maximum-scale=1on its own blocks zoom too. - Size the garden's welcome heading as
text-[5vw]. Zooming does not change it, so it never reaches twice its size. - Put
h-32 overflow-hiddenon the card text "South-facing, raised bed, water tap within ten metres. Tools are kept in the shed by the gate." At 200 percent the last lines vanish with no way to read them. - Give the hero banner
h-[420px]with its heading and Book a plot button inside it, so that at 200 percent the button spills out over the section below. - Give a toast body a fixed height, so the end of "Your booking for Plot 14 is confirmed for 12 April" is cut off.
Exceptions
- Captions and images of text. Captions and text that is part of an image are outside this rule. When text may be an image at all is a separate criterion, not covered here.
- Text the browser draws. Only what the browser or the system draws is exempt, such as the browser's built-in validation bubble or an
alert()orconfirm()dialog. The page's own controls still have to grow, including the button of an<input type="file">and any tooltip the page builds. - Truncation with a way to the whole. Let text wrap or its box grow first. Where that cannot be done, an ellipsis is acceptable when it is clear that more can be seen and the full text is one step away, such as a plot name in a card that is visibly a link to the plot's page. A tooltip may be that way only when the visible part still tells the item apart from the others and is enough to use it, and it opens on focus too; what the person needs stays on the page (TXT-002b). Where the ellipsis leads nowhere, the text is lost. LAY-001 covers the same case at 320 pixels.
- No exception for small labels. Tabs, app bars and navigation labels grow with the rest of the page. Browser zoom enlarges them, and the criterion makes no exception for them.
- Neighbouring rules. Reflow at 400 percent is LAY-001, text spacing is LAY-003b, contrast is VIS-001, and target size is ACT-006.
Verdict
Requirement. Only the judges decide; the expert witnesses are shown but do not vote. How verdicts work
| Source | Role | Stance | Page |
|---|---|---|---|
| WCAG 2.2 | Law | Requires | 1.4.4 Resize Text |
| WCAG 2.2 | Law | Supports | 1.4.10 Reflow |
| Material Design | Judge | Supports | Writing and text: Text resizing Writing and text: Text truncation |
| Apple Human Interface Guidelines | Judge | Supports | Accessibility Typography (ios, ipados, tvos, visionos, watchos, macos; Dynamic Type is a system setting with no web counterpart, and macOS has no Dynamic Type) Layout |
| Carbon Design System | Judge | No position | |
| GOV.UK Design System | Expert witness | Supports | Type scale |
| Nielsen Norman Group | Expert witness | Supports | Let Users Control Font Size, by Jakob Nielsen |
Each stance links to the page it rests on, read on the date in the source register. This page never repeats what a source says; read the source itself.
History
- Version 1.0.0, : First version.
Last checked against the other rules for conflicts on .
More in Layout: 4 rules and 0 guidelines · All rules
Justified is an independent project. It is not affiliated with, sponsored or endorsed by the organisations whose guidance it cites. Read the full statement.
Apple is a trademark of Apple Inc., registered in the U.S. and other countries and regions.