Skip to content

WKWebView in ASDisplayNode doesn't work with VoiceOver #1954

@ZevEisenberg

Description

@ZevEisenberg

If a WKWebView is loaded into an ASDisplayNode, the web view's HTML contents are not accessible to VoiceOver. I will upload a sample project later, or if I can get the test target building on Xcode 12, I'll write a unit test that demonstrates the problem.

A potential fix that seems to work: modify _ASDisplayViewAccessibility.mm's implementation of -accessibilityElements to return nil instead of an empty array if it does not find any elements. I believe this is because WKWebView's accessibility elements are handled out-of-process. By returning an empty array, I think we were telling the system that there were no accessibility elements.

Reproduced on iOS 14.3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions