简体   繁体   English

屏幕阅读器不解释标签导航吗?

[英]Screen reader is not interpreting tab navgation?

I have a pop-up window that I have enabled with tab stops via tabindex=0 . 我有一个通过tabindex=0启用了制表位的弹出窗口。 When I interact with the page without a screen reader, I can use the tab key to move between the window and form elements that it contains. 在没有屏幕阅读器的情况下与页面进行交互时,可以使用Tab键在窗口和其中包含的表单元素之间移动。

When I use my screen reader client (Window Eyes 8.4) to view my website, I cannot consistently tab into the window. 当我使用屏幕阅读器客户端(Window Eyes 8.4)查看我的网站时,我无法始终如一地进入窗口。

Are there any special cases with code structure that I should be considering that would cause the window to either lose focus or prevent the screen reader from interpreting the markup of the pop-up? 我是否应该考虑代码结构的特殊情况,这些特殊情况会导致窗口失去焦点或阻止屏幕阅读器解释弹出窗口的标记?

For reference - I'm in a ASP .NET MVC4 web app (page is HTML/CSS/JS) that is generating the pop-up with a Kendo UI [Kendo] Window. 供参考-我在一个ASP.NET MVC4 Web应用程序(页面为HTML / CSS / JS)中,该应用程序使用Kendo UI [Kendo]窗口生成弹出窗口。

03/17 Update - The pop-up is intermittently announced by the screen reader as a dialogue box but as soon as the pop-up loads, I can - occasionally - tab into the div and focus is not lost. 03/17更新 -屏幕阅读器间歇性地将弹出窗口声明为对话框,但是一旦弹出窗口加载,我可以-偶尔-跳到div中并且焦点不会丢失。 I am not able to consistently reproduce this and only found this out after pressing the tab key rapidly after pressing the button to show the pop-up. 我无法始终如一地重现此内容,只能在按下按钮以显示弹出窗口后快速按Tab键才能找到。

On the other hand (when not hitting the tab key rapidly), the focus consistently lands at the pop-up without focus outlines (screen reader announces "Foo dialogue box") but on first tab keypress, focus jumps back to the underlying page at the last actionable element before the footer. 另一方面(当未快速按下Tab键时),焦点始终停留在没有焦点轮廓的弹出窗口上(屏幕阅读器会宣布“ Foo对话框”),但是在第一次按下Tab键时,焦点会跳回到位于页脚前的最后一个可操作元素。 Pressing tab at this time will then move me into the footer UL element. 此时按Tab将使我进入页脚UL元素。

It is difficult to answer without a demo, but there are a couple of areas to investigate. 如果没有演示,很难回答,但是有两个方面需要调查。

I did a page on the accessibility requirements for a content based pop-up , ie one that is not a form. 针对基于内容的弹出窗口 (即不是表单的弹出窗口)的可访问性要求做了一页。 That also includes code on how to manage the focus. 这还包括有关如何管理焦点的代码。

If the pop-up is essentially form based, you might want to try this one on dialogue boxes . 如果弹出窗口本质上是基于表单的,则可能需要在对话框上尝试弹出窗口。

You'll see from those examples that adding tabindex to the container is only part of it, you should manage the focus as well, so that the focus is moved to the pop-up. 您将从这些示例中看到,将tabindex添加到容器只是其中的一部分,还应该管理焦点,以便将焦点移至弹出窗口。

The sporadic nature of the issue might be because screen readers generally don't read things that are display:none , and tabbing to something that isn't there may not activate reliably. 该问题的零星性质可能是因为屏幕阅读器通常不读取display:none ,而切换到不存在的内容可能无法可靠地激活。

If you can post an example I can update this answer. 如果您可以举一个例子,我可以更新这个答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM