Search code examples
androidwebviewaccessibilityandroid-a11y

Accessibility and Android WebView


Is Accessibility enabled for Android WebView? Can anyone tell how to make a WebView accessible?


Solution

  • The Android webview accessibility is enabled via javascript injection in Honeycomb and above (as pointed out by alanv). The user must enable it by:

    • Turning on Accessibility mode, including 'Explore by Touch' in 4.0+.
    • Enabling 'Enhanced Web Accessibility', or, on older devices, 'Inject Web Scripts'.

    This works by injecting javascript into each loaded pages via <script> tags. Note that you will have to be careful, as not all content will play nice with this javascript, and the injection will fail in some edge cases.