大网数据广告活动
Web 标准与前端开发

ElementInternals: ariaDescribedByElements property

· 52CE 我爱测

The **`ariaDescribedByElements`** property of the ElementInternals interface is an array containing the element (or elements) that provide an accessible description for the element it is applied to. The accessible description is similar to the accessible label (see Element/ariaLa

DOM

The ariaDescribedByElements property of the ElementInternals interface is an array containing the element (or elements) that provide an accessible description for the element it is applied to. The accessible description is similar to the accessible label (see Element/ariaLabelledByElements), but provides more verbose information.

The aria-describedby topic contains additional information about how the attribute and property should be used.

Value

An array of subclasses of HTMLElement. The inner text of these elements can be joined with spaces to get the accessible description.

When read, the returned array is a static and read-only. When written, the assigned array is copied: subsequent changes to the array do not affect the value of the property.

Description

The property is a flexible alternative to using the aria-describedby attribute to set the accessible description. Unlike aria-describedby, the elements assigned to this property do not have to have an id attribute.

The property reflects the element's aria-describedby attribute when it is defined, but only for listed reference id values that match valid in-scope elements. If the property is set, then the corresponding attribute is cleared. For more information about reflected element references and scope see Reflected element references in the Reflected attributes guide.

Examples

The examples in the following documents are relevant:

  • Element.ariaDescribedByElements is the DOM equivalent of this property. It is used in the same way, but within the DOM instead of a shadow DOM and/or custom element.

Specifications

Browser compatibility

See also

来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
MDN Web Docs / Mozilla 贡献者
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 2.5

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。