New issue
Advanced search Search tips

Issue 719573 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Compat
Team-Accessibility


Participants' hotlists:
iOS-Web-Platform-Backlog


Sign in to add a comment

override viewport scale limits

Project Member Reported by rdb@chromium.org, May 8 2017

Issue description

App Version (from "Chrome Settings > About Chrome"): 58.0.3029.83
iOS Version: 10.3.1 (14E304)
Device: iPhone 6s

Steps to reproduce: Load page with <meta user-scalable=0 set (I believe this is the setting that's causing this bad behavior)

Observed behavior: User cannot pinch-to-zoom small text.

Expected behavior: User can zoom in to read the text.

Frequency: 
Always

Additional comments: 

(Apologies to non-Googlers): This bug was reported and fixed in Android here: https://b.corp.google.com/issues/2405694.

Basically, iOS Chrome has an accessibility problem where the web developer can override the ability for a user to zoom in on small text and read it. I'm sure you'll agree that Chrome should allow users to read small text. Pinch-and-zoom is a reasonable solution to this.

The 'curbed' images show a well-behaved website. (1) the website, (2) scrolling down to an image (3) user can zoom in on the image to examine a small part of the image (4) example of smaller text at the bottom of the page that may also cause issues for a user.

The "The hill" images show a badly-behaved website which doesn't work well in Chrome. (1) the website (2 and 3) video overflows over the right side of the viewport. Pinch-to-zoom is disabled, so the user can't even see the entire video.

The "ESPN" images show another badly-behaved website, as well as showing how the iOS accessibility settings don't affect the Chrome text size. Pinch-to-zoom is disabled. (1) website with small-ish text. (2) top of the website (3). iOS setting to increase text size (under display and brightness) (4) website stays the same (5) increasing accessibility text size (6) website stays the same.

I included the ESPN example for completeness. There are two solutions to the viewport scalability problem I can think of. I think two of those are not great.

Solution 1: Respect iOS global text size settings.  This is not great because it increases the font size throughout all applications.

Solution 2: Add a 'zoom' per-tab option on iOS, just like we have on desktop. This is also not great because it requires more taps than pinch-to-zoom. Additionally it will likely reflow the page, moving the user around on the page (likely away from what they wanted to zoom in on).  Additionally I don't know if zoom will scale the image sizes.

Solution 3 (preferred). Override the viewport scalability setting if the user pinches-to-zoom. This allows a quick way for a user to zoom in on an image or on small text, and then quickly go back to the normal viewport.  Scrolling with one finger can respect the viewport so the view stays the same (acting like an app).
 
curbed 1.png
390 KB View Download
curbed 2.png
1.1 MB View Download
curbed 3.png
1.1 MB View Download
curbed 4.png
615 KB View Download
the hill 1.png
889 KB View Download
the hill 2.png
927 KB View Download
the hill 3.png
952 KB View Download
espn 1.png
194 KB View Download
espn 2.png
227 KB View Download
espn 3.png
74.7 KB View Download
espn 4.png
227 KB View Download
espn 5.png
74.4 KB View Download
espn 6.png
210 KB View Download

Comment 2 by pkl@chromium.org, May 8 2017

Components: Mobile>WebView>Glue
Owner: eugene...@chromium.org
Status: Assigned (was: Untriaged)
Is this a WKWebView issue?
Cc: danyao@chromium.org
Labels: -Type-Bug -Pri-2 Pri-3 Type-Compat
URLs mentioned in comment#1 shows the same behavior in WKWebView app and Firefox ie., Pinch to Zoom is not working. From test team, we have also noticed the same behavior on nytimes.com webpage. Pinch to zoom is not working on this webpage.
Safari is supporting pinch to zoom on all these websites.
Cc: eugene...@chromium.org
Owner: ----
Status: Available (was: Assigned)

Comment 6 by danyao@chromium.org, Sep 29 2017

WebKit shipped an interview that allows user-scalable=no to be ignored in iOS 10.1. Safari has this on by default. According to iOS 10.1 release notes, WKWebView can allow user to pinch-to-zoom on all pages by setting the WKWebViewConfiguration property ignoresViewportScaleLimits to YES.

https://developer.apple.com/library/content/releasenotes/General/RN-iOSSDK-10.1/index.html

Comment 7 by rdb@chromium.org, Nov 29 2017

Cc: katie@chromium.org

Comment 8 by katydek@google.com, Nov 29 2017

Cc: dmazz...@chromium.org

Comment 9 by rdb@chromium.org, May 3 2018

Friendly ping.
Danyao, do you think we should set ignoresViewportScaleLimits to YES?
I'm a bit concerned from web compatibility perspective to set ignoresViewportScaleLimits by default. Assuming most web developers use "user-scalable=0" responsibly, overriding their choice to handle the outliers discovered here seems unfair.

It seems that same concern was raised on the Android thread: https://b.corp.google.com/u/1/issues/2405694.

On the other hand, I think the compat risk will much less a concern if ignoresViewportScaleLimits is only set as a response to explicit user setting. Would this be workable?
I don't think we can add a setting for this. In Chrome we trying to have fewer settings in general.
I'd be happy even if it was a setting that was off by default, but I do understand the sentiment that reducing the number of settings is good.

That said, when I hit a website that's unreadable, it's a really, really terrible experience. Here are two screenshots of a page on backblaze.com. Open the images, zoom out until the image is the same size as your phone screen. Then try to read the chart.
IMG_9346.png
558 KB View Download
IMG_9347.png
515 KB View Download
Cc: ajuma@chromium.org
Given that Safari already does this by default (https://webkit.org/blog/7367/new-interaction-behaviors-in-ios-10/), setting ignoresViewportScaleLimits to true unconditionally seems fine from a web compatibility perspective -- any content that would be broken by this is already broken on Safari on iOS. So the benefits to users from being able to pinch-zoom would seem to outweigh the costs.
Project Member

Comment 16 by bugdroid1@chromium.org, Oct 18

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/468b6d5f0e9a7fa7f3f8c10590978b97b93600ab

commit 468b6d5f0e9a7fa7f3f8c10590978b97b93600ab
Author: Eugene But <eugenebut@google.com>
Date: Thu Oct 18 21:17:45 2018

Add IgnoresViewportScaleLimits feature behind the flag.

When enabled the page can always be scaled, regardless of author intent.

Bug: 719573
Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
Change-Id: I01051016300e816daf0335c8394ad607cdb5d9b8
Reviewed-on: https://chromium-review.googlesource.com/c/1289440
Reviewed-by: Ali Juma <ajuma@chromium.org>
Commit-Queue: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600912}
[modify] https://crrev.com/468b6d5f0e9a7fa7f3f8c10590978b97b93600ab/ios/chrome/browser/about_flags.mm
[modify] https://crrev.com/468b6d5f0e9a7fa7f3f8c10590978b97b93600ab/ios/chrome/browser/ios_chrome_flag_descriptions.cc
[modify] https://crrev.com/468b6d5f0e9a7fa7f3f8c10590978b97b93600ab/ios/chrome/browser/ios_chrome_flag_descriptions.h
[modify] https://crrev.com/468b6d5f0e9a7fa7f3f8c10590978b97b93600ab/ios/web/features.mm
[modify] https://crrev.com/468b6d5f0e9a7fa7f3f8c10590978b97b93600ab/ios/web/public/features.h
[modify] https://crrev.com/468b6d5f0e9a7fa7f3f8c10590978b97b93600ab/ios/web/web_state/ui/wk_web_view_configuration_provider.mm

Cc: linds...@chromium.org
This feature will be included as experimental feature in Chrome 72 (scheduled to release on Jan 29).

Flipping this to default will require some time for testing. Lindsay, do you think test team can do exploratory testing with ignores-viewport-scale-limits flag enabled? Basically the flag can affect the way how web sites are rendered and scaled. 
YES!! Thank you!
Components: Mobile>iOSWeb
Components: -Mobile>WebView>Glue
Components: -Mobile>iOSWeb Mobile>iOSWeb>WebPlatform

Sign in to add a comment