Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic font scale according to accessibility option "font size" of device does not work on Android #540

Open
5 tasks done
ghowen opened this issue Sep 30, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@ghowen
Copy link

ghowen commented Sep 30, 2020

Environment

Technology Version
Flutter version 1.20.4
Plugin version 4.0.0+4
Android version 10
iOS version 14
Xcode version

Device information: Nokia 5.3 and iPhone 6s Plus

Description

Users with eye sight impairments have the option to generally use a bigger font on their devices using the accessibility settings of the device. On Android the webview should automatically respect the accessibility settings and scale fonts accordingly when Javascript is enabled (https://a11y-guidelines.orange.com/mobile_EN/dev-android.html).

The InAppWebView does not scale fonts according to the accessibility settings (unless I am missing something here!).

On iOS scaling needed to be enabled through the CSS selector font: -apple-system-body; and on this platform it works as expected with the InAppWebView.

Expected behavior:

If the user choses a larger font size in the accessibility settings of his Android device, the webview should scale the fonts accordingly.

Current behavior:

On Android the InAppWebView does not respect the accessibility settings.

@ghowen ghowen added the bug Something isn't working label Sep 30, 2020
@ghowen
Copy link
Author

ghowen commented Sep 30, 2020

Additional info: It looks like the InAppWebView does not respect the font size settings, but it does respect the display size setting of the accessibility settings. Chrome on the other hand respects both. So I still suspect that the InAppWebView could respect that too.

@uc-dve
Copy link

uc-dve commented Jul 9, 2021

Any update on it, it is working fine on webview_flutter?

@PawelSzymanski89
Copy link

any up?

@PawelSzymanski89
Copy link

@ghowen i have workaround
add this:
android: AndroidInAppWebViewOptions( textZoom: (MediaQuery.of(context).textScaleFactor * 100).ceil(),

in init options

@Den-creator
Copy link

What about iOS ? How to scale font size for the whole page ?
I see related not answered question - #69.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants