Skip to content

Dashboard: allow pinch-to-zoom by dropping maximum-scale on dashboard sections - #113337

Merged
p-jackson merged 1 commit into
trunkfrom
DOTMSD-1473-remove-maximum-scale
Aug 9, 2026
Merged

Dashboard: allow pinch-to-zoom by dropping maximum-scale on dashboard sections#113337
p-jackson merged 1 commit into
trunkfrom
DOTMSD-1473-remove-maximum-scale

Conversation

@p-jackson

@p-jackson p-jackson commented Aug 6, 2026

Copy link
Copy Markdown
Member

Fixes DOTMSD-1473

Proposed Changes

  • Allow pinch-to-zoom on Dashboard (Multi-Site Dashboard) pages by dropping maximum-scale=1 from the viewport meta tag for the dashboard sections (dashboard-dotcom, dashboard-ciab, dashboard-a4a).
  • Head keeps maximum-scale=1 by default; a new allowZoom prop opts a surface out. Every non-Dashboard surface is unchanged.

Why are these changes being made?

maximum-scale=1 blocks pinch-to-zoom, which is an accessibility problem for low-vision users.

It was re-added in Oct 2025 by "Disable zoom for login page" (#106160), but applied to the shared Head component, so it affected every Calypso page rather than just login. Scoping the removal to the Dashboard restores zoom where we control the surface (consistent wp-core components) while leaving login's intended behaviour intact.

History of maximum-scale=1 in the viewport meta:

Date Commit What it did
2015 53bde8c3f9c Initial commit of wp-calypso — present from day one (original Jade/Pug template)
2018-01-31 e73971877a2 Pug→JSX migration (#21424) — carried into head/index.jsx
2019-04-29 468644b51e9 "Remove the maximum scale limitation" — removed it
2025-10-01 e2195a9e504 "Disable zoom for login page" (#106160) — re-added it globally (the instance this PR scopes down)

Mobile Safari note: iOS 10+ ignores maximum-scale/user-scalable=no to always permit pinch-zoom, so this only changes behaviour on Android (which honours it). iOS input focus-zoom is unaffected either way.

Testing Instructions

  • On Android (or Chrome DevTools device emulation), open a Dashboard page (e.g. /sites) and confirm pinch-to-zoom works.
  • Open a non-Dashboard page (e.g. login) and confirm pinch-to-zoom is still blocked.
  • yarn test-client client/components/head/test/index.jsx passes.

Considerations

Scoped to all three dashboard variants (dotcom/ciab/a4a) since they share the same client. allowZoom is section-based rather than env-gated, so it applies wherever the dashboard renders.

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • For UI changes, have you tested the affected components in dark mode?
  • Have you tested accessibility for your changes? Ensure the feature remains usable with various user agents (e.g., browsers), interfaces (e.g., keyboard navigation), and assistive technologies (e.g., screen readers) (PCYsg-S3g-p2).
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

… sections

Scope maximum-scale removal to dashboard sections via a new Head allowZoom prop; other surfaces keep maximum-scale=1.
@p-jackson p-jackson self-assigned this Aug 6, 2026
@p-jackson
p-jackson marked this pull request as ready for review August 6, 2026 08:30
@p-jackson
p-jackson requested a review from a team August 6, 2026 08:41
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Aug 6, 2026
@p-jackson p-jackson mentioned this pull request Aug 6, 2026
9 tasks
Comment thread client/document/index.jsx
branchName={ branchName }
inlineScriptNonce={ inlineScriptNonce }
faviconUrl={ headFaviconUrl }
allowZoom={ isDashboardSection }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to disable zoom on log-in page?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😮‍💨 Yes you're probably right. You've highlighted that I'm basically taking a shortcut. Now I have to decide whether the shortcut is warranted 😭

I think the proper fix is that the login page (and basically all pages in Calypso, but there's fewer and fewer of them over time) should be using the input controls from @wordpress/components which mean that the auto zoom doesn't happen.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can move this forward and address it later 🙂

@p-jackson
p-jackson merged commit 859fab3 into trunk Aug 9, 2026
33 checks passed
@p-jackson
p-jackson deleted the DOTMSD-1473-remove-maximum-scale branch August 9, 2026 22:56
@github-actions github-actions Bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants