Repository navigation
Web HIG tip #8: Don't disable browser zoom #18
frozonfreak
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
user-scalable=nostops a layout from shifting when someone pinches. It also stops a person who can't read small text from making it bigger.Web HIG tip #8 (Quick #79): Do not disable browser zoom or pinch-to-zoom.
Why it matters
Zoom is how many people make the web readable:
The rule of thumb
Ask: if someone pinches or presses Ctrl and + (Cmd and + on a Mac), does the page get bigger?
If not, remove whatever is stopping it.
If zoom was blocked to stop iOS from zooming into small form fields, fix the cause instead. iOS Safari zooms in on a focused input when its font size is under 16px, so give inputs a font size of at least 16px.
Do this instead
maximum-scale=1anduser-scalable=nofrom the viewport meta tagrem, so browser text-size settings still applyQuick check for your app
Open one key screen on a phone and pinch to zoom in. Then open it on desktop and zoom to 200%. On both, the content should get bigger and stay usable, with nothing cut off or overlapping. Then search your code for
user-scalable=noandmaximum-scale=1.The 200% check is its own rule: content must stay usable at 200% zoom (Quick #77). The full HIG (§5.1, Zoom & reflow) also asks that text be resizable without losing content, and that standard layouts reflow at 400% without horizontal scrolling where applicable.
The Web HIG is a behavioral contract for how the web should behave, not a component library. Design systems define how it looks. The Web HIG defines how it behaves.
All reactions