辅助功能-Android Talkback不会在HTML内容上触发焦点事件 [英] Accessibility - Android Talkback doesn't fire focus event on HTML content

查看:66
本文介绍了辅助功能-Android Talkback不会在HTML内容上触发焦点事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在HTML页面上的Android设备(Moto G Android 4.4.3)上使用话语提示"来执行/接收 onfocus HTML事件,同时选择一个 input 字段.

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.

我在单个输入文本上创建了一个 onfocus 事件:当对讲使用触摸资源管理器"时,永远不会调用此事件.当我使用话语提示"选择/悬停它时,我的字段上有一个轮廓,但是它不是HTML :focus 状态:

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()">

请参见此小提琴示例: https://jsfiddle.net/hpgqmz7f/embedded/result/

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

在IOS + VoiceOver或Chrome @ PC + NVDA上,焦点事件的调用没有问题.

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

感谢您的帮助

此页面表明,借助辅助技术,对讲"应该触发对第1次点击的关注

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

推荐答案

旨在与触摸屏配合使用的移动屏幕阅读器(VoiceOver和TalkBack)引入了一种特殊的可访问性焦点".仅通过辅助技术来跟踪此焦点.AT会将此关注点与您在Web开发中常用的其他关注点类型分开跟踪.这种焦点类型在单击后即发生变化,称为触摸探索.两种主要的移动屏幕阅读器均支持触摸浏览模式.这就是为什么您的文本字段onFocus事件没有触发的原因.它尚未得到关注.它已收到可访问性焦点",并且在用户双击之后,它应该会收到一个轻击事件,这将导致触发正常的焦点事件.

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.

这篇关于辅助功能-Android Talkback不会在HTML内容上触发焦点事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆