Html 'aria-descriptionby' 属性的含义是什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4582694/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is the meaning of the 'aria-describedby' property?
提问by Rinkal Bhanderi
The following HTML is inserted by the jQuery Grid plugin:
以下 HTML 由 jQuery Grid 插件插入:
<td role="gridcell" style="" aria-describedby="list_createdBy">Sam</td>
What is the meaning of the 'aria-describedby' property?
'aria-descriptionby' 属性的含义是什么?
采纳答案by Quentin
This is described in the aria specification. It gives the id of an element that provides some additional information about the current element that some users might need.
这在aria 规范中有描述。它给出了一个元素的 id,该元素提供了一些用户可能需要的有关当前元素的一些附加信息。
回答by jakobinn
Here below is an example of how you could use the aria-describedby property. It is used when you have a text that has information about the element. Aria-describedby must be the same as the id of the text that describes it.
下面是一个示例,说明如何使用 aria-describedby 属性。当你有一个包含元素信息的文本时使用它。Aria-Describedby 必须与描述它的文本的 id 相同。
First name: <input aria-describedby="name" type="text">
<em id="name">Your first name must be correct.</em>
First name: <input aria-describedby="name" type="text">
<em id="name">Your first name must be correct.</em>