PSA: Browser text zoom on Android will now work like it does on desktop

1,551 views
Skip to first unread message

Jonathan Bernal

unread,
Aug 2, 2023, 1:27:10 PM8/2/23
to blin...@chromium.org, Jonathan Bernal, Mark Schillaci, Amanda Lin Dietz, Philip Rogers, Ian Kilpatrick, Chris Harrelson

Contact emails

mschi...@google.com, rayjon...@google.com, p...@google.com, ikilp...@google.com, ald...@google.com, chri...@google.com


Explainer

https://docs.google.com/document/d/1vRVRJFaY3TWRFkrKvLhhiBemTfFxUzI_co4YZq_kB0E/edit


Summary

Browser text zoom on Android will now work like it does on desktop. See https://blog.google/products/android/new-android-features-february-2023/ for a blog post about it. The default rendered zoom value of a given page will transparently account for a user’s OS-level font size setting. This means that any user on Android who has a non-default OS-level font size setting (~40% of users), will use a non-100% zoom on Android Chrome by default. This feature is currently released to 10% of stable users.


How to opt into the feature:

  1. Go to chrome://flags

  2. Search for "Accessibility Page Zoom”

  3. Use the dropdown box to switch the feature from “Default” to “Enabled”

  4. Restart Chrome (force quit)


How to use the feature: https://support.google.com/chrome/answer/96810?co=GENIE.Platform%3DAndroid&oco=1

Blink component

Compositor 


Risks

  • This will change the overall distribution of window.innerWidth values a website sees, which may be unexpected.

  • Don't currently have any provision for opting out specific origins (eg. overriding the default zoom level back to 100%) if breakage is discovered.


Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Android and Android WebView


Is this feature fully tested by web-platform-tests?

No


Flag name

Accessibility Page Zoom

Requires code in //chrome?

Yes


Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=645717


Launch bug

https://launch.corp.google.com/launch/4206588 (sorry, Googlers only)


Estimated milestones

M113

Link to entry on the Chrome Platform Status

N/A


Links to previous Intent discussions

N/A


Torne (Richard Coles)

unread,
Aug 2, 2023, 2:15:05 PM8/2/23
to Jonathan Bernal, blin...@chromium.org, Mark Schillaci, Amanda Lin Dietz, Philip Rogers, Ian Kilpatrick, Chris Harrelson
This mentions it's supported in Android WebView, but WebView has always used the font size specified in the OS to scale text specifically (*not* to scale CSS pixels): https://source.chromium.org/chromium/chromium/src/+/main:android_webview/java/src/org/chromium/android_webview/AwSettings.java;l=296;drc=334d01268df246e959b238956ab956413562edfb

Does this change actually affect WebView? If so, how? If it ends up stacking with the text zoom we are already doing then the results may not be desirable.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CA%2B8nQZ6JJHyUXC5fofsnSW2gAi64Xqe7WHus94FqQs%3DFMS1qOA%40mail.gmail.com.

Torne (Richard Coles)

unread,
Aug 2, 2023, 3:12:56 PM8/2/23
to Jonathan Bernal, blin...@chromium.org, Mark Schillaci, Amanda Lin Dietz, Philip Rogers, Ian Kilpatrick, Chris Harrelson
This mentions it's supported in Android WebView, but WebView has always used the font size specified in the OS to scale text specifically (*not* to scale CSS pixels): https://source.chromium.org/chromium/chromium/src/+/main:android_webview/java/src/org/chromium/android_webview/AwSettings.java;l=296;drc=334d01268df246e959b238956ab956413562edfb

Does this change actually affect WebView? If so, how? If it ends up stacking with the text zoom we are already doing then the results may not be desirable.

On Wed, 2 Aug 2023 at 13:27, 'Jonathan Bernal' via blink-dev <blin...@chromium.org> wrote:

Rick Byers

unread,
Dec 16, 2023, 11:17:57 AM12/16/23
to Torne (Richard Coles), Jonathan Bernal, blin...@chromium.org, Mark Schillaci, Amanda Lin Dietz, Philip Rogers, Ian Kilpatrick, Chris Harrelson
Hi Jonathan,
In doing bug triage, I'm randomly coming across multiple web developers confused by this behavior. Do we need a blog post perhaps to help raise awareness and provide a better announcement to the community than a blink-dev thread?

Thanks,
   Rick

Daniel Herr

unread,
Jan 10, 2024, 12:20:22 PM1/10/24
to blink-dev, Rick Byers, Jonathan Bernal, blin...@chromium.org, Mark Schillaci, Amanda Lin Dietz, Philip Rogers, ikilp...@google.com, chri...@google.com, Torne (Richard Coles)
I would like to point out that at least on Chrome OS, the font scale does not affect the display scale. Personally I consider that to be the correct behavior.

The argument that scaling only the size of text but not zooming the page would cause issues due to developers hardcoding UI elements containing text using nonresponsive sizes is true, but no more so that is already the case on CrOS/Win/Mac/Linux using the browser specific font size settings.

Mark Schillaci

unread,
Feb 2, 2024, 11:33:28 AM2/2/24
to Torne (Richard Coles), Jonathan Bernal, blin...@chromium.org, Amanda Lin Dietz, Philip Rogers, Ian Kilpatrick, Chris Harrelson
Just to loop back on this - Page Zoom does not affect WebView. The custom text zoom of WebView was not changed.

Sorry for the delay :p.
Reply all
Reply to author
Forward
0 new messages