Bug 187013 - AX: WKWebView should support increasing text size for accessibility
Summary: AX: WKWebView should support increasing text size for accessibility
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-06-25 13:13 PDT by Ali Juma
Modified: 2022-03-15 16:38 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ali Juma 2018-06-25 13:13:04 PDT
WKWebView ignores the "Larger Text" accessibility setting on iOS (Settings->General->Accessibility->Larger Text).

WKWebView should either automatically increase text size when this setting is enabled (creating a better user experience in all WKWebView applications), or expose the currently private [WKWebView _setTextZoom] so that an embedding app can opt to increase text size for users that need this.

rdar://41436409
Comment 1 James Craig 2022-03-15 16:38:12 PDT
Standard web text does not not reflect the system font size because not all web views are coded well enough to contain it well. More recently iOS added app-specific font sizes, because the same is true of native apps, not all support dynamic type equivalently. iOS Safari added a domain-specific font size controller in the URL field.

For your app, you can either adjust the web content to use the legacy vendor-prefixed CSS keywords (like -apple-system-body) or implement your own font size controller similar to what iOS Safari has done in iOS 13 and later.
Comment 2 James Craig 2022-03-15 16:38:21 PDT
There's an example of the vendor-prefixed font size keywords in the demo file for reduced motion. View source here: https://webkit.org/blog-files/prefers-reduced-motion/prm.htm

html {
	font: 100% sans-serif;
	font: -apple-system-body;
}
body {
	font-size: 0.8em;
	line-height: 1.1;
}