简体   繁体   English

PC Chrome中的a11y:打开JAWS时,向上/向下箭头键导致黄色突出显示

[英]a11y in PC Chrome: Up/Down Arrow keys causing yellow highlight when JAWS open

I've been working over the past several months to make a site accessible and a JAWS issue has recently brought to my attention by our QA department. 在过去的几个月中,我一直在努力使网站变得可访问,并且我们的质量检查部门最近已引起JAWS问题的注意。

I've put up a CodePen showing an example similar to what I've built. 我已经建立了一个CodePen,显示了一个与我构建的示例类似的示例。 The main piece here is the Track List: 这里的主要作品是曲目列表:

<div id="track-list"
    tabindex="0"
    role="menu"
    aria-expanded="true"
    aria-activedescendant="ch1">

https://codepen.io/Motorcykey/pen/qyJrWX https://codepen.io/Motorcykey/pen/qyJrWX

Background: The idea is that we have a Chapter list of menu-items which can be hidden or shown by clicking a Button. 背景:想法是我们有一个菜单项的“章节”列表,可以通过单击“按钮”来隐藏或显示这些菜单项。 When the list is showing, you will tab from the Chapters button into the list. 显示列表时,您将从“章节”按钮切换到列表中。 Once in the list, Tab & Shift+Tab will only scroll through the menu items. 进入列表后,Tab&Shift + Tab只会在菜单项中滚动。 Only the 'Esc' key will exit the list. 只有“ Esc”键会退出列表。

The Issue: Without JAWS running this works fine. 问题:如果没有运行JAWS,则可以正常运行。 If a user attempts to hit the 'Up/Down' keys, nothing out of the ordinary occurs. 如果用户尝试按“上/下”键,则不会发生任何异常情况。

However, once JAWS is open it was found that if the Up/Down keys were used then a colored highlight box would appear that would read other parts of the page without necessarily focusing them. 但是,一旦打开JAWS,就会发现如果使用上/下键,则会出现一个彩色的高亮框,该框将读取页面的其他部分,而不必将其聚焦。 Originally, this would include the hidden menu-items, but I was able to get rid of this by setting their display to 'none' (as opposed to just setting their opacity to '0'). 最初,这将包括隐藏的菜单项,但是我能够通过将其显示设置为“无”(而不是仅将其不透明度设置为“ 0”)来摆脱这种情况。

However, you can still see in this example that if you take the following steps: 但是,在此示例中您仍然可以看到,如果执行以下步骤:

  1. Tab to Chapters Button 标签到章节按钮
  2. Hit Space or Enter to hide the menu 点击空格键或Enter以隐藏菜单
  3. Hit the 'Down' Key on the keyboard. 按下键盘上的“向下”键。 The next, "Play/Pause button" should highlight and be read aloud by JAWS screen reader. 下一个“播放/暂停按钮”应突出显示,并由JAWS屏幕阅读器朗读。
  4. Meanwhile, the 'Chapters' button remains 'focused' with the default browser highlight. 同时,“章节”按钮保持“焦点”,默认浏览器突出显示。

My question is around this highlight box and the expected function of Up/Down keys within JAWS. 我的问题是围绕此高亮显示框以及JAWS中的Up / Down键的预期功能。 What is the purpose of this highlight box as it seems decoupled from the browser focus. 这个高亮显示框的用途是什么,因为它似乎与浏览器焦点分离了。 Is there a way to disable it? 有没有办法禁用它? Do users typically use Up/Down keys, and if so, does this look like the expected behavior or should I be taking more into consideration to avoid confusion around these keys while working on accessibility updates? 用户通常使用向上/向下键吗?如果这样,这是否看起来像预期的行为?或者在进行辅助功能更新时,我是否应该更多地考虑避免混淆这些键?

Thank you, 谢谢,

-Mikey -米奇

an element with role="menu" must be controlled by arrow keys eg down arrow key moves focus to the next menu item and up arrow moves to the previous menu item and tab/shift+tab must moves focus to the next/previous page element. 具有角色=“ menu”的元素必须由箭头键控制,例如,向下箭头键将焦点移至下一个菜单项,而向上箭头键将移至上一个菜单项,并且tab / shift + tab必须将焦点移至下一个/上一页元素。 the correct implementation example: https://www.w3.org/TR/wai-aria-practices-1.1/#menubutton 正确的实现示例: https : //www.w3.org/TR/wai-aria-practices-1.1/#menubutton

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

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