Element.ariaDetailsElements is an array of elements that provide accessible details for the element it is applied to (MDN). Details are similar to an accessible description, but usually more verbose.
Read the notes below before you get or set this property. Prefer feature detection when support is limited.
Syntax
Use el.ariaDetailsElements. Start with this line.
JavaScript
const nodes = button.ariaDetailsElements;
Call
What it does
const nodes = button.ariaDetailsElements;
Primary signature.
Built into the browser. Read or assign el.ariaDetailsElements — no import required.
Library declarations
JavaScript
const nodes = button.ariaDetailsElements;
Parameters
Parameter
Description
Property
Required. el.ariaDetailsElements
Attribute
Optional. aria-details id list
Return Value
Return Value
Description
*
The current value of el.ariaDetailsElements.
JavaScript Examples
Example 1 — Read Details from aria-details (MDN)
Resolve the attribute into elements, then join their text.
JavaScript
const button = document.querySelector("button");
console.log("aria-details:", button.getAttribute("aria-details"));
if ("ariaDetailsElements" in Element.prototype) {
const nodes = button.ariaDetailsElements;
const text = nodes.map((el) => el.textContent.trim()).join(" ");
console.log("Accessible details:", text);
} else {
console.log("ariaDetailsElements not supported");
}
Hold real DOM nodes. No id is required when you set the property (MDN).
Assign an array. The engine copies it — later array edits are ignored.
Re-read the property to confirm the relationship.
Expect a cleared attribute. Setting the property clears aria-details (MDN).
Example 3 — Feature-Detect Before Use
Guard every call site on older browsers.
JavaScript
if ("ariaDetailsElements" in Element.prototype) {
console.log("ariaDetailsElements is supported");
} else {
console.log("ariaDetailsElements not supported by browser");
}
ariaDetailsElements is supported
(or “not supported by browser”)
How It Works
Use the in operator on Element.prototype.
Branch safely. Older engines need an aria-details id fallback.
Detect once at startup if you use the property often.
Remember Baseline 2025. Newest evergreen browsers are fine; older ones are not.
Compatibility
Browser Support
Element.ariaDetailsElements is Baseline Newly available (MDN: across latest browsers since April 2025). Feature-detect on older engines and keep an aria-details id fallback if needed.
✓ Baseline 2025 · Newly available
ariaDetailsElements
Element-reference form of aria-details for verbose accessible details.
2025Newly available
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Chromium & Legacy
Full support
Internet ExplorerIE 6+ · Legacy environments
Full support
OperaAll modern versions
Full support
ariaDetailsElementsLatest browsers
Bottom line: Prefer the property when supported. Otherwise use aria-details ids. Setting the property clears the attribute.
Frequently Asked Questions
An array of HTMLElement subclasses that provide accessible details for the element. You can join their text with spaces to form a details string (MDN).
No. MDN marks Element.ariaDetailsElements as Baseline 2025 Newly available (since April 2025). It is not Deprecated, Experimental, or Non-standard. Feature-detect on older browsers.
The attribute uses space-separated id strings. The property uses Element references. Assigned elements do not need an id. Setting the property clears the corresponding attribute (MDN).
Accessible details are similar to an accessible description (ariaDescribedByElements) but provide more verbose information. MDN notes aria-details does not replace the accessible description.
No. When read, the returned array is static and read-only. When written, the assigned array is copied — later changes to that array do not update the property (MDN).
Yes. Custom elements can use ElementInternals.ariaDetailsElements for the same relationship from inside a component (MDN).