axe-core meta-viewport error zooming and scaling disabled failed
Fixes the axe-core meta-viewport violation: viewport meta tags that disable zooming or scaling. Use when axe flags 'zooming and scaling must not be disabled'. Not for responsive layout bugs, and not for native apps where the web view is intentionally fixed.
axe-core meta-viewport error zooming and scaling disabled failed - how to fix it
TL;DR
A viewport tag with maximum-scale=1.0 or user-scalable=no prevents users from pinch-zooming, which low-vision users depend on to read content. Remove the zoom-blocking parts and keep [meta name="viewport" content="width=device-width, initial-scale=1"]. Then verify the layout does not break at 200-400% zoom, because enabling zoom exposes the reflow bugs the restriction was hiding.
The usual story behind user-scalable=no is a mobile web app that wanted to prevent double-tap zoom from interfering with fast button taps. Modern browsers removed the double-tap zoom delay on responsive pages, so the original reason is gone and the restriction only harms users now. Removing it is safe on any page with a proper viewport tag.
The verbatim error looks like this:
axe-core 4.x
Rule: meta-viewport (critical)
"Zooming and scaling must not be disabled"
Element: [meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"]
maximum-scale=1.0 and user-scalable=no disable zoom.Steps
- Reproduce with the single rule:
npx @axe-core/cli https://example.com/ --rules meta-viewportExpected: the viewport meta tag is flagged.
- Open the page head and find the viewport meta tag. The offending parts are maximum-scale=1.0 (or any value below 2), user-scalable=no, or user-scalable=0.
- Replace it with the accessible baseline:
[meta name="viewport" content="width=device-width, initial-scale=1"]- Re-run the focused scan. Expected output: 0 violations for meta-viewport.
- Zoom the page to 200% and 400% in a real browser and fix the layout breakage that appears. Pages that disabled zoom often did so to hide reflow bugs; those bugs are now yours to fix (check for fixed-width containers and horizontal scroll).
- Check for the tag in every template and in any PWA or meta-tag manager config. Mobile frameworks sometimes inject it from a config file rather than HTML:
rg -l 'user-scalable' src/ public/ config/- After removing the restriction, test form inputs on iOS Safari. iOS zooms into inputs with font-size below 16px; teams sometimes re-add maximum-scale to 'fix' that. The correct fix is font-size: 16px on inputs, not disabling zoom.
When to use
- Axe flags meta-viewport with critical severity.
- A mobile web page cannot be pinch-zoomed.
- A template or framework starter ships user-scalable=no by default.
When not to use
- The layout breaks at high zoom (fix the CSS reflow; do not re-disable zoom).
- The page is a fixed canvas game or signature pad where zoom genuinely conflicts (provide an alternative zoom or text-size control instead).
- You are building a native app web view (platform conventions differ; still provide in-app text sizing).
Why it happens
Pinch-to-zoom is assistive technology for millions of low-vision users. Disabling it takes away their primary reading tool. It is also a WCAG 1.4.4 (Resize Text) failure in spirit: users must be able to resize content to 200% without loss of functionality. The restriction is almost always a design shortcut, not a requirement.
Early mobile web development treated zoom as a bug: pages designed for desktop broke when users zoomed, so developers disabled it. Responsive design fixed the underlying layout problem, but the viewport restriction survived in starter templates and copy-pasted snippets. It is now one of the most common critical violations on mobile pages, and one of the easiest to fix.
Edge cases
- maximum-scale=2.0 or higher passes the rule, but anything below about 5 still harms low-vision users. Prefer no maximum at all.
- Some frameworks inject the restrictive viewport via a default template or PWA manifest setting. Fix it at the template level.
- iOS Safari historically ignored user-scalable=no in some versions, which masked the bug in testing. Test on Android Chrome too.
- After enabling zoom, watch for position: fixed headers overlapping zoomed content; use responsive units instead of fixed pixel offsets.
- Some Android WebView wrappers set the restriction natively. If the meta tag is correct but zoom still fails, check the native wrapper config.
- maximum-scale=1.0 combined with a map or canvas interaction is still a violation. Provide in-app zoom controls for the map instead.
- Accessibility overlays that promise to 'fix' zoom by re-enabling it are a red flag; fix the meta tag directly.
Provenance
Resolved from the public thread: https://vectle.com/posts/pstoWxBjadFbvXWOmPJIMVpg