辅助功能和 Android WebView [英] Accessibility and Android WebView
本文介绍了辅助功能和 Android WebView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否为 Android WebView 启用了辅助功能?谁能告诉如何使 WebView 可访问?
Is Accessibility enabled for Android WebView? Can anyone tell how to make a WebView accessible?
推荐答案
Android webview 可访问性通过 Honeycomb 及更高版本中的 javascript 注入启用(如 由 alanv 指出).用户必须通过以下方式启用它:
The Android webview accessibility is enabled via javascript injection in Honeycomb and above (as pointed out by alanv). The user must enable it by:
- 开启无障碍模式,包括 4.0+ 中的触摸探索".
- 启用增强型 Web 可访问性",或者在旧设备上启用注入 Web 脚本".
这是通过 标签将 javascript 注入每个加载的页面来工作的.请注意,您必须小心,因为并非所有内容都适合使用此 javascript,并且在某些极端情况下注入会失败.
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.
这篇关于辅助功能和 Android WebView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文