Accessibility - Android Talkback doesn't fire focus event on HTML content

戏子无情 提交于 2019-12-02 13:48:31

问题


I'm trying to execute/receive a onfocus HTML event using Talkback on an Android Device (Moto G Android 4.4.3) on an HTML page while selecting an input field.

I created on single input text with an onfocus event : this event never get called when using "touch explorer" with talkback. When I select/hover it with Talkback there is a little outline over my field it but it's not the HTML :focus state :

<input type="text" id="myInput" onfocus="focusFunction()" onblur="blurFunction()">

See this fiddle for an example : https://jsfiddle.net/hpgqmz7f/embedded/result/

On IOS + VoiceOver or Chrome@PC + NVDA, the focus event is called without problem..

Thanks for the help

edit: this page show that with assistive technology, Talkback should trigger a focus on 1st tap


回答1:


Mobile screen readers (VoiceOver and TalkBack) that are designed to be used with touch screens, introduce a special type of "accessibility focus". This focus is tracked only by the Assistive Tech. The AT tracks this focus separately from other types of focus you're use to in Web Development vernacular. It is this type of focus that gets shifted after a single tap, called touch to explore. Both major mobile screen readers support a touch to explore mode. This is why your text field onFocus event is not firing. It hasn't received focus yet. It has received "Accessibility Focus" and after the user double taps, it should receive a tap event, which then should cause the normal focus events to fire.



来源:https://stackoverflow.com/questions/31006404/accessibility-android-talkback-doesnt-fire-focus-event-on-html-content

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