[英]Setting focus of a screen reader on a modal alert in ember
I am attempting to make my ember.js app more accessible and am doing my testing via Apple's built-in VoiceOver utility. 我试图让我的ember.js应用程序更容易访问,并通过Apple的内置VoiceOver实用程序进行测试。 I'm adding ariaRoles as necessary to my views and tacking on aria-label attributes where the purpose of navigation is unclear. 我正在根据我的观点添加ariaRoles并添加导航目的不明确的aria-label属性。 I'm having issues getting the focus on modal alerts, as the reader's focus stays on the page items behind the modal. 我在关注模态警报时遇到了问题,因为读者的注意力集中在模态背后的页面项上。 Does anyone have experience handling focus on modal alerts for screen readers? 有没有人有经验处理专注于屏幕阅读器的模态警报? I'm under the impression that declaring "ariaRole:'alertDialog'" in my view sets the appropriate role for such a dialog, and it is possible that the focus behavior for this role differs between screen readers. 我的印象是在我的视图中声明“ariaRole:'alertDialog'”为这样的对话设置了适当的角色,并且这个角色的焦点行为可能在屏幕阅读器之间有所不同。 Thanks!!! 谢谢!!!
I don't have first hand experience with modal stuff. 我对模态的东西没有第一手经验。 Essentially your issue is you are throwing on an ARIA role, and kind of expect it to work. 基本上你的问题是你正在投入ARIA角色,并期望它能够发挥作用。 You need to do more than that. 你需要做的不仅仅是这些。 You need to keep the following in mind: 您需要牢记以下几点:
<div>
. 大多数模态元素只是一个<div>
。 You can give the <div>
an attribute of tabindex="-1"
. 您可以为<div>
提供tabindex="-1"
的属性。 Resources 资源
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.