问题描述
我有一个输入字段,在其中搜索某些内容时会弹出一个预先输入的弹出窗口。屏幕阅读器无法读取弹出窗口中建议的值。
我使用 $ActiveIndex
变量保持焦点。我只能使用箭头键浏览列表,屏幕阅读器在浏览弹出列表时只读取输入文本,而不是建议中的实际值
HTML 代码是这样的:
<input type="text"
class="search"
title="Search User"
ng-model="vm.SearchText"
ng-model-options="{ debounce: 300 }"
aria-label="{{ placeholder }}"
ng-required="requiredattr" />
<ul class="ui list menu typeahead popup-layer vertical" ng-show="vm.MenuShown" ng-mousedown="vm.RetainFocus()">
<li class="item"
ng-class="{ active: $index == vm.ActiveIndex }"
ng-click="vm.Add(match)"
ng-repeat="match in vm.Matches track by $index">
<div class="header">
<i class="ban icon" ng-if="match.Deleted"></i>
<span ng-bind-html="match.displayName"></span> <!-- I want this displayName to be read -->
</div>
</li>
</ul>
界面如下
每次我用箭头键浏览结果时,屏幕阅读器只会读“suh”。
我尝试过的事情:
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)