简体   繁体   English

使用键盘向下箭头更改选项时 JAWS 未读取选择框值

[英]JAWS not reading select box value when changing options using keyboard down arrow

I'm testing my web page for accessibility using JAWS reader.我正在使用 JAWS 阅读器测试我的网页的可访问性。 Below is a sample HTML markup from my page.下面是我的页面中的示例 HTML 标记。

<label for="MySelectBox">Select a color</label>
<select id="MySelectBox">
    <option>Red</option>
    <option>Blue</option>
    <option>Green</option>
</select>

When navigating the page through keyboard and changing the select box value using Down arrow key, JAWS is not reading the changing values as you press down arrow.通过键盘导航页面并使用向下箭头键更改选择框值时,JAWS 不会在您按下箭头时读取更改的值。

Anything I'm missing in here?我在这里缺少什么吗? Should I add any additional ARIA labels to make JAWS recognize the change event?我是否应该添加任何其他 ARIA 标签以使 JAWS 识别更改事件?

This one does seem strange.这个看起来很奇怪。 You can debug this by first creating test html page containing just the code you pasted here and testing it under same setup.您可以通过首先创建仅包含您在此处粘贴的代码的测试 html 页面并在相同设置下对其进行测试来对此进行调试。 If that works, you might want to go back your page and check for incorrectly formatted mark-up above this select box.如果可行,您可能需要返回页面并检查此选择框上方的格式不正确的标记。 Sometimes unclosed tags (typical culprits: <LI> and <BR> ) and erroneous JavaScript/Jquery element manipulations create issues with screen readers.If possible, post your rendered page's HTML content here for others to review.有时未关闭的标签(典型的罪魁祸首: <LI><BR> )和错误的 JavaScript/Jquery 元素操作会导致屏幕阅读器出现问题。如果可能,请在此处发布您呈现的页面的 HTML 内容以供其他人查看。

For anyone else who might see this, I was having trouble having JAWS read the ListItems stored in the DropDownList too.对于可能会看到这一点的其他任何人,我也无法让JAWS读取存储在DropDownListListItems

I had been testing this only in Chrome and after reading the comments here tested in Firefox and JAWS would read the ListItems when you scrolled through the DropDownList with the arrow keys.我只在 Chrome 中对此进行了测试,在阅读了此处在 Firefox 中测试的评论后,当您使用箭头键滚动DropDownList时, JAWS会读取ListItems So this must be a compatibility issue with Chrome.所以这一定是与 Chrome 的兼容性问题。

You need to add aria-live="assertive" to the select tag.您需要将 aria-live="assertive" 添加到选择标签。 Reference : http://www.freedomscientific.com/Training/Surfs-Up/AriaLiveRegions.htm参考: http : //www.freedomscientific.com/Training/Surfs-Up/AriaLiveRegions.htm

JAWS not reads the text of <option>Red</option> . JAWS 不会读取<option>Red</option>的文本。 <option> should have aria attribute , that is aria-label="value" . <option>应该有aria 属性,即aria-label="value"
<option> element should be <option aria-label="red" >Red</option> . <option>元素应该是<option aria-label="red" >Red</option>

I was using asp:Dropwnlist .我正在使用asp:Dropwnlist This has worked for me:这对我有用:

  1. Add aria-live="assertive" to the <asp:DropDownList> </asp:DropDownList> tagaria-live="assertive"添加到<asp:DropDownList> </asp:DropDownList>标记
  2. Add arial-label="whatevervalue" to the <asp:ListItem/> tagarial-label="whatevervalue"<asp:ListItem/>标签

Tested using Chrome + NVDA screen reader使用 Chrome + NVDA 屏幕阅读器测试

I had an issue similar to this, this is what I added to fix it for me.我有一个与此类似的问题,这是我添加的内容来为我修复它。 You may need to a different form of activedescendant, but you need something to focus on the selection when you hit the down arrow.您可能需要不同形式的 activedescendant,但是当您点击向下箭头时,您需要专注于选择。 https://www.w3.org/TR/wai-aria-practices/#kbd_focus_activedescendant https://www.w3.org/TR/wai-aria-practices/#kbd_focus_activedescendant

aria-live="assertive value" aria-required="true" aria-activedescendant="ID_REF" aria-live="断言值" aria-required="true" aria-activedescendant="ID_REF"

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

相关问题 使用 JAWS 时如何使 div 元素可通过箭头键导航 - How to make a div element navigable by arrow keys when using JAWS 如何添加向上箭头以选择元素以及向下箭头以及仅使用这些箭头来遍历选项? - How to add an up arrow to select element along with down arrow and to traverse options only using these arrows? 与jQuery同步并使用向上/向下箭头键时,滑块(输入范围)和组合框(选择)之间发生奇怪的交互 - Strange interaction between slider (input range) and combo box (select) when syncing them with jQuery and using up/down arrow keys JAWS无法读取更新的输入值 - JAWS not reading updated input value 如何使用 CSS 在选择框处于活动状态时更改箭头旋转 - How to change arrow rotation when select box is active using CSS 如何在Firefox中按下向下箭头时显示html select的所有选项 - How to show up all options of html select when press down arrow in Firefox 当使用背景颜色设置时,HTML选择框不显示Android 4.0版本上的下拉箭头 - HTML select box not showing drop-down arrow on android version 4.0 when set with background color 筛选选择下拉框选项 - Filtering select drop down box options 让下巴阅读选择中的所有选项 - get jaws to read all options in a select 根据不同的选择选项更改选择框中的选项 - Changing options in select box based on different select options
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM