2

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

Jscti
  • 14,096
  • 4
  • 62
  • 87
  • what happens when you double-tap? – unobf Jun 23 '15 at 15:46
  • on double tap it's OK (focus, click, touch etc fired) but I don't want to do that, I need the focus on a single tap. – Jscti Jun 24 '15 at 06:44
  • what you want is not the way it works – unobf Jun 24 '15 at 06:49
  • It should and it works perfectly on IOS or PC. On 1st tap with assistive technology, android should trigger a focus, relating to this page : https://patrickhlauke.github.io/touch/tests/results/#mobile-tablet-touchscreen-assistive-technology-events or am I missing something else ? Thanks – Jscti Jun 24 '15 at 07:05
  • It should NOT focus after a single tap. Single tap focus changes Android TalkBack focus. You're misunderstanding how talkback works. Focus and Accessibility Focus are two different things, and need to be tracked different for the Android screen reader to function properly. – MobA11y Jun 24 '15 at 18:33

1 Answers1

2

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.

MobA11y
  • 18,425
  • 3
  • 49
  • 76
  • is there a way to fire an `onTap` event or `onAccessbilityFocus` event? In other words, is there a way to manipulate the accessibility focus? I'm currently having similar issues with Android's Talkback. – kdizzle Nov 15 '17 at 00:49
  • You don't need to fire a tap event to manipulate focus. Ask a question and link it here, i will answer. – MobA11y Nov 15 '17 at 05:31
  • Hi, here's my posted question: https://stackoverflow.com/questions/47315314/android-talkback-not-registering-onfocus-for-web-how-do-i-manipulate-accessibil – kdizzle Nov 15 '17 at 19:03