[英]Making parent aria-label read first, and then child content
I have code where I have listitem
instead of a list
. 我有代码,我有
listitem
而不是list
。 The content that is being read is as follows: 正在阅读的内容如下:
Item 2, group list mylist 2 items
. Item 2, group list mylist 2 items
。
I would like it to be read like: 我希望它像:
mylist 2 items, Item 2
. mylist 2 items, Item 2
。
Basically, I want the parent list aria-label to be read first, and then the child element. 基本上,我希望首先读取父列表aria-label,然后是子元素。
Here's the code: https://jsfiddle.net/81sc9dum/1/ 这是代码: https : //jsfiddle.net/81sc9dum/1/
Okay, looks like you can do this if you introduce the value for the element that you want to be read later (aria-label) on the event itself. 好的,看起来你可以这样做,如果你在事件本身上引入你想要稍后阅读的元素的值(aria-label)。
So if it's on focus, you actually add the aria-label on focus, and then it would read the parent first, and then the child. 因此,如果它在焦点上,你实际上在焦点上添加了aria-label,然后它将首先读取父节点,然后是子节点。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.