[英]WAI ARIA - screen reader reading multiple times
I've run into weird problem that's driving me crazy. 我遇到了使我发疯的怪异问题。 Actually I have an HTML structure like
其实我有一个HTML结构,例如
<button ng-disabled="vm.updating" ng-click="doSomething()" class="something" type="submit" aria-label="average score"> <span ng hide="hideConditional()" class="font-white">score</span> <span ng-show="showConditional()" class="font-white"> <span class="grey"></span> <span>scoring</span> </span> </button>
When I turn on the screen reader, it reads average score score scoring button multiple times and then again score scoring , but I only want it to read whatever text I write into the button and ignore child elements text like everything which is inside spans or any control underneath the button. 当我打开屏幕阅读器时,它会多次读取平均得分得分按钮 ,然后再次得分 ,但是我只希望它读取我写到按钮中的所有文本,而忽略子元素文本,例如span内的所有内容或任何其他内容按钮下方的控件。 But I am not able to ignore the rest of the content.
但是我无法忽略其余内容。 I tried to use
aria-hidden
on each span
but no avail. 我尝试在每个
span
上使用aria-hidden
,但无济于事。 Can anyone please correct me? 谁能纠正我? What am I missing here?
我在这里想念什么? How can make the screen reader ignore text from elements inside
button
and make it only read text which is set on the button itself? 如何使屏幕阅读器忽略
button
内元素的文本,而仅读取按钮本身上设置的文本?
I've used: 我用过:
<div class="" aria-hidden="true" role="presentation" > </div>
It worked very well for me. 对我来说效果很好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.