首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用SelectBoxIt js时,JAWS不读取使用无序列表创建的下拉列表项

使用SelectBoxIt js时,JAWS不读取使用无序列表创建的下拉列表项
EN

Stack Overflow用户
提问于 2021-10-29 12:18:04
回答 1查看 343关注 0票数 0

下面是使用selectboxit js生成的下拉列表代码。当集中在项目上时,JAWS不会读取选择列表中的项目。我试过在li,a,span,甚至i元素上添加咏叹号和标题属性,但它仍然没有读取。我需要添加哪些属性,以便JAWS能够在焦点上正确地读取它。当使用上下箭头时,焦点将正确地放在li元素上。

代码语言:javascript
复制
<ul id="ddlSubReason_1SelectBoxItOptions" class="selectboxit-options selectboxit-list" tabindex="-1" role="listbox" aria-hidden="true">
   <li id="0" data-val="" data-disabled="false" class="selectboxit-option selectboxit-option-first selectboxit-selected" role="option" aria-label="">
   <a class="selectboxit-option-anchor">
   <span class="selectboxit-option-icon-container">
   <i class="selectboxit-option-icon  selectboxit-container"></i></span></a></li>
   <li id="1" data-val="29" data-disabled="false" class="selectboxit-option" role="option" aria-label="Selection text placeholder 1">
   <a class="selectboxit-option-anchor">
   <span class="selectboxit-option-icon-container">
   <i class="selectboxit-option-icon  selectboxit-container"></i></span>
   Selection text placeholder 1</a></li>
   <li id="2" data-val="28" data-disabled="false" class="selectboxit-option" role="option" aria-label="Selection text placeholder 2">
   <a class="selectboxit-option-anchor">
   <span class="selectboxit-option-icon-container">
   <i class="selectboxit-option-icon  selectboxit-container"></i></span>
   Selection text placeholder 2</a></li>
   <li id="3" data-val="55" data-disabled="false" class="selectboxit-option" role="option" aria-label="Selection text placeholder 3">
   <a class="selectboxit-option-anchor">
   <span class="selectboxit-option-icon-container">
   <i class="selectboxit-option-icon  selectboxit-container"></i></span>
   Selection text placeholder 3</a></li>  
</ul>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-11-01 09:06:32

发布对我有用的解决方案,我在这个链接- https://webaim.org/discussion/mail_thread?thread=6559上找到了它。

interaction.

  • Added

  • 将tabindex="0“移到了周围的span中,因为这应该可以将键盘ID和tabindex="-1”处理到使用role=option.

  • Added aria的所有元素中--激活了带有role=combobox的容器,而容器应该被动态更新以指向所选的。(我错过了这个为我解决问题的特别点)
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69768746

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档