Who it affects
Someone with macular degeneration reading the museum's opening times on their phone pinches to zoom, nothing happens, and the 14 pixel text stays 14 pixels.
Someone in bright sunlight, or who has left their glasses at home cannot enlarge the text to read a platform number.
Someone with a hand tremor zooms in to make a small link bigger and easier to tap, and cannot.
Broken versus fixed
The broken markup is shown as code rather than rendered, because the effect is in how it is announced or handled, not how it looks.
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
Pinching on a phone does nothing. Some browsers ignore the restriction; many do not.
<meta name="viewport" content="width=device-width, initial-scale=1">
The page fits the screen and can be zoomed up to the browser's limit, usually 500%.
Test it by hand in two minutes
- Open the page on a phone and pinch. The page should enlarge.
- View the page source and read the viewport meta tag. Delete user-scalable=no and any maximum-scale.
- In Chrome DevTools, toggle the device toolbar (Ctrl+Shift+M) and check the tag in the Elements panel; emulation does not always honour the restriction, so trust the source.
- Check the phone's own accessibility zoom still works (iOS: Settings, Accessibility, Zoom). It usually does, but it is not a substitute.
The fix
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="viewport" content="width=device-width, initial-scale=1">
The restriction is usually added to stop accidental zoom on a form. Fix the form instead: 16 pixel inputs stop iOS zooming on focus.
iOS zooming into inputs
input { font-size: 14px; }
input { font-size: 16px; }
iOS Safari zooms into a field whose text is under 16 pixels. Setting the size to 16 removes the reason for blocking zoom.
Web app that wants a full-screen feel
content="width=device-width, initial-scale=1, maximum-scale=1"
content="width=device-width, initial-scale=1, viewport-fit=cover"
viewport-fit controls the safe areas round the notch. It does not need maximum-scale.
Common mistakes
- Setting maximum-scale=1.5; the scanner allows 2 or more, and WCAG wants text resizable to 200% at least.
- Blocking zoom with touch-action: none or a JavaScript gesture handler instead, which the scanner cannot see.
- Copying the tag from a game or kiosk template into a content site.
- Thinking a responsive layout removes the need for zoom; people zoom to read, not to make the page fit.
WCAG criteria this rule maps to
axe-core tags this rule as WCAG 2.2 level AA. It is one of the checks for:
- 1.4.4 Resize Text (level AA). Official W3C text.
The scanner reads the viewport meta tag and fails it when user-scalable=no is present or maximum-scale is below 2. It cannot detect zoom blocked by CSS or script, and cannot test on a real phone. Automated tools find only part of the accessibility problems on a page; a pass on this rule is not a pass on the criterion.
Related rules
css-orientation-lock
Some sites decide they only work in landscape and use a media query to rotate the whole page 90 degrees when the phone is held upright, or show a please rotate your device overlay.
AA
Text spacing must not be locked with !important
avoid-inline-spacing
Some people with dyslexia or low vision read far better with wider line, letter or word spacing, and they apply it with a browser extension or a bookmarklet.
AA
Buttons and links must be big enough to press
target-size
Every control you can click or tap needs to be at least 24 by 24 CSS pixels, or have enough empty space around it that a 24 pixel circle centred on it does not touch a neighbour.
AA
Text must have enough contrast with its background
color-contrast
Text needs enough difference in brightness from its background to be readable by people with low vision, or by anyone on a dim screen.