squirrelscan
GitHub

user-scalable=no: viewport settings that block zoom

A viewport that caps the zoom level stops low-vision users enlarging text. squirrel parses the viewport meta tag on every page.

What the viewport meta tag does

<meta name="viewport"> tells a mobile browser how to lay out the page. Its content value is a comma-separated list of directives, and three of them constrain zoom: user-scalable, maximum-scale and minimum-scale.

Someone with low vision may enlarge a page several times over to read it. Capping the zoom takes that away, and nothing on screen explains why pinching does nothing. WCAG success criterion 1.4.4 Resize Text, Level AA, requires text to scale to 200 percent without losing content or function.

What squirrel checks

One check, zoom-disabled, at severity error. It reads the first meta[name="viewport"] on the page and parses its content, tolerating whitespace around each =.

  • Fail with Viewport restricts user zoom when any of the following appears. Each match is listed as an item, and the finding carries the raw viewport string along with the note maximum-scale should be ≥ 5.
    • user-scalable set to no, 0 or false
    • maximum-scale below 5
    • minimum-scale above 1
  • Pass with User zoom is not restricted.
  • Info with No viewport meta tag found.

The maximum-scale cutoff of 5 matches the threshold Lighthouse uses. It is stricter than WCAG’s 200 percent, so a page with maximum-scale=3 fails this rule and can still meet the success criterion, provided text reaches 200 percent without losing content or function.

How to fix it

<meta name="viewport" content="width=device-width, initial-scale=1">

That is the whole tag for almost every site. width=device-width and initial-scale=1 set the layout, and leaving the scale directives out means the browser’s own limits apply.

user-scalable=no is usually added to stop a mobile browser zooming in when a form field takes focus. Raising the input’s font size removes that behavior without removing the user’s ability to zoom.

Rule IDa11y/zoom-disabled
CategoryAccessibility
ScopePer-page
Severityerror
Weight7/10

Enable / disable

Disable this rule

[rules]
disable = ["a11y/zoom-disabled"]

Disable all Accessibility rules

[rules]
disable = ["a11y/*"]

Enable only this rule

[rules]
enable = ["a11y/zoom-disabled"]

enable replaces the default ["*"], so this is the only rule selected. Leave disable out: a rule that matches any disable pattern is skipped even when enable names it. Only an enabled setting under a rule’s own [rule_options] table overrides both lists.

Accessibility findings ship in every audit next to the SEO, performance and agent experience rules. See Website security scan with AI for how an agent works through a report.

References

Check your site

Run squirrel audit https://example.com and open the Accessibility section of the report. Each offending directive is listed separately, alongside the raw viewport string. Signed-out local audits need no account and cost nothing. Signed-in audits spend credits.

Type to search…

↑↓ navigate↵ openesc close