Element.ariaDetailsElements is an instance property that holds an array of elements providing accessible details. Learn how it relates to aria-details, how details differ from a shorter description, and how to get or set the relationship from JavaScript—with five examples and try-it labs.
01
Kind
Instance property
02
Returns
HTMLElement[]
03
Writable
Yes (get / set)
04
Reflects
aria-details
05
Status
Baseline 2025
06
Use for
Verbose accessible details
Fundamentals
Introduction
Sometimes a control needs richer related content than a short description—extra paragraphs, structured help, or longer explanation that users may want to explore. ARIA exposes that link with aria-details.
ariaDetailsElements is the modern element-reference form: you work with real DOM nodes instead of only managing id strings. Accessible details are similar to an accessible description, but typically more verbose.
Think: description is a short annotation; details points to longer related content. Prefer ariaDescribedByElements or ariaDescription for brief help; use details for richer related information.
Concept
Understanding the Property
MDN: the ariaDetailsElements property of the Element interface is an array containing the element (or elements) that provide an accessible details for the element it is applied to. The accessible details are similar to the accessible description (see ariaDescribedByElements), but provide more verbose information.
Get / set — read or assign an array of elements.
Flexible alternative to the aria-details attribute.
No id required on detail nodes when you set the property (MDN).
Reflection — reads valid in-scope id refs from the attribute; setting the property clears the attribute.
Foundation
📝 Syntax
JavaScript
ariaDetailsElements
Value
An array of subclasses of HTMLElement. The inner text of these elements can be joined with spaces to get the accessible details.
When read, the returned array is static and read-only.
When written, the assigned array is copied—later edits to that array do not change the property.
Compare
⚖️ Property vs aria-details Attribute
Attribute
Property
API
aria-details="id1 id2"
el.ariaDetailsElements
Points to
Space-separated id strings
Array of Element objects
Targets need id?
Yes
No (when set via property)
After you set the property
—
Corresponding attribute is cleared (MDN)
Pattern
📋 Button With Details (MDN Shape)
MDN’s example links a button to two detail spans via aria-details:
JavaScript
<button aria-details="details1 details2">Button text</button>
<span id="details1">Details 1 information about the element.</span>
<span id="details2">Details 2 information about the element.</span>
Detect support and read MDN’s button / details example.
Example 1 — Feature-Detect
Check whether the reflected property exists.
JavaScript
if ("ariaDetailsElements" in Element.prototype) {
console.log("ariaDetailsElements is supported");
} else {
console.log("ariaDetailsElements not supported by browser");
}
aria-details: details1 details2
count: 2
Accessible details: Details 1 information about the element. Details 2 information about the element.
How It Works
The property resolves valid in-scope id references from aria-details into real element objects. Joining textContent rebuilds a details string from those nodes.
📈 Set Array, Attribute Sync & Snapshot
Assign detail nodes without ids and verify reflection rules.
Example 3 — Set Details Array
Assign elements that have no id; the attribute is cleared after set.
JavaScript
const btn = document.createElement("button");
const d1 = document.createElement("span");
const d2 = document.createElement("span");
btn.textContent = "Learn more";
d1.textContent = "Section A: long-form help about this control.";
d2.textContent = "Section B: extra related information.";
document.body.append(btn, d1, d2);
if ("ariaDetailsElements" in Element.prototype) {
btn.ariaDetailsElements = [d1, d2];
console.log({
count: btn.ariaDetailsElements.length,
attrAfterSet: btn.getAttribute("aria-details"),
text: btn.ariaDetailsElements.map((e) => e.textContent).join(" ")
});
} else {
console.log("ariaDetailsElements not supported by browser");
}
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. Logos use the shared browser-image-sprite.png sprite from this project.
✓ Baseline 2025
Element.ariaDetailsElements
HTMLElement[] — reflected aria-details element references.
BaselineNewly available 2025
Google ChromeSupported in current releases — feature-detect older
Yes
Microsoft EdgeSupported in current releases — feature-detect older
Yes
Mozilla FirefoxSupported in current releases — feature-detect older
Yes
Apple SafariSupported in current releases — feature-detect older
Yes
OperaFollow Chromium support
Yes
Internet ExplorerNot supported — use aria-details attribute
No
ariaDetailsElementsBaseline
Bottom line: Detect "ariaDetailsElements" in Element.prototype. Prefer element arrays for dynamic detail content. Fall back to aria-details id strings when the property is missing. Re-assign arrays when detail nodes change.
Wrap Up
Conclusion
ariaDetailsElements lets you manage accessible details with real Element references instead of only id strings. Feature-detect on older browsers, reserve details for richer related content, and re-assign the array when those nodes change.
Mutate a previously assigned array and expect updates
Assume every older browser exposes the IDL property
Point to empty or unrelated elements
Confuse details with a short aria-description
Skip a clear accessible name on the control
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about ariaDetailsElements
Reflected aria-details as an array of element references.
5
Core concepts
📄01
Get / set
on Element
Kind
📝02
Element array
HTMLElement[]
Type
🔍03
No id needed
when property-set
Rule
✅04
Baseline
newly available
Status
🎯05
Detect
older browsers
Tip
❓ Frequently Asked Questions
An array of HTMLElement subclasses that provide accessible details for the element. Join their inner text with spaces to form the details string.
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.
Accessible details are similar to an accessible description (see ariaDescribedByElements) but provide more verbose information—often richer content users can navigate to.
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.
Yes. Custom elements can use ElementInternals.ariaDetailsElements for the same relationship from inside a component.
Did you know?
Unlike a short description that is often announced automatically, aria-details relationships usually point users toward longer related content they can navigate to—useful when the help is too long for a single announcement.