amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

Users can't zoom pages in AMP Viewer

Open magyarandras opened this issue 9 years ago • 14 comments

What's the issue?

The google mobile search results page has the following viewport settings in the head:

<meta content="width=device-width,maximum-scale=1.0,initial-scale=1.0,minimum-scale=1.0,user-scalable=yes,shrink-to-fit=no" name="viewport">

user-scalable=yes, but maximum-scale=1.0, so the users can't zoom the search results and the AMP Viewer with their mobile devices. amp-viewer2

I think it would be a good idea to provide a method to zoom in pages in AMP viewer.

How do we reproduce the issue?

Open an AMP page from google mobile search results and try to zoom in the page with AMP viewer, but you can't. amp-viewer

What browsers are affected?

It's not a browser/device related problem.

Which AMP version is affected?

Sorry, I know this problem is not related to the amphtml open source project, but I hope you can help/answer my question, or should I send a feedback report to Google(https://support.google.com/websearch/answer/6223687?co=GENIE.Platform%3DAndroid&hl=en)?

magyarandras avatar May 21 '17 14:05 magyarandras

/to @chenshay /cc @ericfs

WAI? what are the concerns with enabling zoom in the viewer?

aghassemi avatar May 22 '17 15:05 aghassemi

Tracked internally: b/38496044

The meta viewport tag is defined for the search page so please do feel free to file Google feedback about it.

ericfs avatar May 22 '17 16:05 ericfs

Thanks @ericfs

aghassemi avatar May 22 '17 17:05 aghassemi

Thanks! I sent a feedback report to Google as well.

magyarandras avatar May 22 '17 18:05 magyarandras

This issue hasn't been updated in awhile. @chenshay Do you have any updates?

ampprojectbot avatar Dec 12 '17 01:12 ampprojectbot

This issue hasn't been updated in awhile. @chenshay Do you have any updates?

ampprojectbot avatar Jun 05 '18 15:06 ampprojectbot

P3 to align with b/38496044 priority

aghassemi avatar Jun 08 '18 16:06 aghassemi

Not sure about the exact use case, but if you need to support zooming on a specific element, <amp-pan-zoom> might be useful. Even if one AMP viewer supports scaling, others may not. Also, AMP documents could be embedded in other sorts of ways in the future that don't support zooming.

/cc @cathyxz

sparhami avatar Jul 16 '18 19:07 sparhami

One exact use case is accessibility for users with low vision (like myself). AMP breaks it. Hypotheticals shouldn't be used to justify not addressing a serious accessibility problem.

cluebcke avatar Sep 26 '19 15:09 cluebcke

The bug here is that the document inside the AMP iframe has touch-action: pan-y which blocks pinch-zoom. Changing to touch-action: pan-y pinch-zoom fixes it for me locally.

One exact use case is accessibility for users with low vision

Just FYI, there's a setting in Chrome>Settings>Accessibility to force enable zooming so that Chrome ignores zooming restrictions set by the page and always allows zooming (it works in this case).

bokand avatar Sep 27 '19 00:09 bokand

The previously mentioned internal tracking bug (b/38496044) is no longer an issue.

I did notice and file: https://crbug.com/1009232 but my understanding is that would not impact most users.

@kristoferbaxter should this be assigned to someone else?

ericfs avatar Sep 30 '19 14:09 ericfs

Just tested and it still doesn't work on iOS Safari/Chrome. user-scalable is not overridden to no and maximum-scale is no longer set, so my guess is this is a platform limitation that restricts pinch-to-zoom on scrollable iframes.

Pinch-to-zoom does work on the google.com viewer header, but that's not really a practical UX.

dreamofabear avatar May 27 '20 22:05 dreamofabear

@ericfs I've created a sample page here which includes a fake viewer and iframed content (with no AMP technologies involved) and it appears to support pinch/zoom.

Can someone take a look?

URL: https://thrilling-workable-flyingfish.glitch.me/

kristoferbaxter avatar Jan 14 '21 19:01 kristoferbaxter

Resolved with #31971. Expect this to come out in the next release.

kristoferbaxter avatar Jan 14 '21 23:01 kristoferbaxter