Bug 187013

Summary: AX: WKWebView should support increasing text size for accessibility
Product: WebKit Reporter: Ali Juma <ajuma>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: eugenebut, jcraig, n_wang, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   

Ali Juma
Reported 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
Attachments
James Craig
Comment 1 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.
James Craig
Comment 2 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; }
Note You need to log in before you can comment on or make changes to this bug.