Announce everything in a UIWebView using VoiceOver?

耗尽温柔 提交于 2019-12-25 05:35:15

问题


My app is primarily loading text-based HTML files into a UIWebView. When a new HTML file is loaded, I'd like it to be read in its entirety to VoiceOver users. Right now, it reads only the headings within <h1> tags, and then stops.

It works great if I double finger swipe down. I'd really just like to automate that process upon each new page load. Right now I'm using the following within webViewDidFinishLoad:

UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, self.theText)
UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification, self.theText)

回答1:


Don't do this! Let the user control their own interaction with the page. Trying to do this would be akin to forcing a sighted user to read every single sentence before showing them the next sentence and not allowing them to skim the page (for example the headings) and choose what to read.



来源:https://stackoverflow.com/questions/30547648/announce-everything-in-a-uiwebview-using-voiceover

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!