aria-details
全局 aria-details 属性标识提供与对象相关附加信息的元素(或元素)。
描述
aria-details 属性可用于为对象提供其他信息或复杂描述。它用于通过提供更深入的信息来告知辅助技术用户有关内容的信息,无论该内容是在当前文档中还是指向其他资产的链接。
还有其他 HTML 和 WAI-ARIA 属性具有类似的目的。HTML <label> 元素以及 aria-label 和 aria-labelledby 属性用于为对象提供简短标签。HTML title 属性以及 aria-description 和 aria-describedby 属性提供了对象的更长纯文本描述。但是,当需要并提供与对象相关的其他信息、复杂描述或可导航内容时,应使用 aria-details 属性。
aria-details 属性的作用类似于 HTML 从未完全支持的 longdesc 属性(替换元素内容的长描述的 URL),由于缺乏支持和滥用而被弃用。
aria-details 属性采用 id 或以空格分隔的 id 列表作为其值,以获取更详细的信息。当在元素上包含 aria-details 时,辅助技术会告知用户扩展信息可用,使用户能够导航到引用的内容。
aria-details 引用的元素旨在包含比通常通过 aria-describedby 提供的更多信息。
aria-details 引用的元素应对所有用户可见。aria-details 会通知可能无法扫描屏幕并快速识别说明性内容可用的用户。
注意:aria-details 对可访问描述没有影响。
与 aria-describedby 不同,aria-details 引用的元素不用于可访问描述,并且在呈现给辅助技术用户时不会转换为简单的字符串。如果关联的内容不太长,并且将引用的元素的内容展平为简单的文本字符串不会导致信息丢失,请考虑改用 aria-describedby。也就是说,元素同时具有 aria-details 和使用 aria-describedby 或 aria-description 指定的描述是有效的。
示例
在定义和术语角色方面,aria-details 将包含在具有 definition 角色的元素的 id 的 term 元素上。
<p>The <strong>cubic-bezier()<strong> functional notation defines a cubic
<span role="term" aria-details="bezier bezImg">Bézier curve</span>. As
these curves are continuous, they are often used to smooth down the start and
end of the curve and are therefore sometimes called easing functions.
</p>
<p role="definition" id="bezier">A <strong>Bézier curve</strong>,
(Pronounced \ ˈbe-zē-ˌā \)
<i aria-description="English pronunciation">BEH-zee-ay</i>) is a mathematically
described curve used in computer graphics and animation. The curve is defined
by a set of control points with a minimum of two. Web related graphics
and animations use Cubic Béziers, which are curves with four control
points P<sub>0</sub>, P<sub>1</sub>, P<sub>2</sub>, and P<sub>3</sub>.
</p>
<a href="bezierExplanation.html" id="bezImg"
aria-label="Explanation of Bézier curve in CSS easing functions">
<img alt="Animated Bézier curve showing 4 control points." src="bezier.gif">
</a>
值
- ID 参考列表
-
提供或链接到其他相关信息的元素的
id或以空格分隔的 id 列表。
关联角色
用于**所有**角色。
规范
| 规范 |
|---|
| 可访问的富互联网应用程序 (WAI-ARIA) # aria-details |
另请参阅
- HTML id 属性
aria-labelledbyaria-describedbyaria-description- 图像
alt属性 - HTML title 属性