JavaScript Element ariaDescribedByElements Property
Beginner
⏱️ 12 min read
📚 Updated: Jul 2026
🎯 5 Examples
🚀 5 Try-it labs
Baseline 2025
Instance property
Overview
What You’ll Learn
Element.ariaDescribedByElements is an instance property that holds an array of elements providing an accessible description. Learn how it relates to aria-describedby, why description targets do not need an id when you set the property, 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-describedby
05
Status
Baseline 2025
06
Use for
Accessible descriptions
Fundamentals
Introduction
Controls often need extra help text: a warning under a destructive button, a hint next to a field, or longer context that is not part of the short accessible name. ARIA exposes that with aria-describedby.
ariaDescribedByElements is the modern element-reference form: you work with real DOM nodes instead of only managing id strings. The accessible description is similar to a label, but usually more verbose.
Think: label names the control; description adds longer help. Prefer ariaDescribedByElements (or aria-describedby) for that help text—not for the short name.
Concept
Understanding the Property
MDN: the ariaDescribedByElements property of the Element 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 ariaLabelledByElements), but provides more verbose information.
Get / set — read or assign an array of elements.
Flexible alternative to the aria-describedby attribute.
No id required on description 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
ariaDescribedByElements
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 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-describedby Attribute
Attribute
Property
API
aria-describedby="id1 id2"
el.ariaDescribedByElements
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 Descriptions (MDN Shape)
MDN’s example links a button to two description spans via aria-describedby. Those spans can be visually hidden while still providing the accessible description:
JavaScript
<button aria-describedby="trash-desc1 trash-desc2">Move to trash</button>
<span id="trash-desc1">Trash will be permanently removed after 30 days.</span>
<span id="trash-desc2">Or Else!</span>
Related element-reference property: ariaControlsElements (controlled regions, not description text).
Detect support and read MDN’s button / description example.
Example 1 — Feature-Detect
Check whether the reflected property exists.
JavaScript
if ("ariaDescribedByElements" in Element.prototype) {
console.log("ariaDescribedByElements is supported");
} else {
console.log("ariaDescribedByElements not supported by browser");
}
aria-describedby: trash-desc1 trash-desc2
count: 2
Accessible description: Trash will be permanently removed after 30 days. Or Else!
How It Works
The property resolves valid in-scope id references from aria-describedby into real element objects. Joining textContent rebuilds the description AT announces.
📈 Set Array, Attribute Sync & Snapshot
Assign description nodes without ids and verify reflection rules.
Example 3 — Set Description 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");
d1.textContent = "Files stay in trash for 30 days.";
d2.textContent = "This cannot be undone.";
document.body.append(btn, d1, d2);
if ("ariaDescribedByElements" in Element.prototype) {
btn.ariaDescribedByElements = [d1, d2];
console.log({
count: btn.ariaDescribedByElements.length,
attrAfterSet: btn.getAttribute("aria-describedby"),
text: btn.ariaDescribedByElements.map((e) => e.textContent).join(" ")
});
} else {
console.log("ariaDescribedByElements not supported by browser");
}
Prefer the property in script when supported; keep id-based aria-describedby as a markup fallback for older browsers.
Example 5 — Support Snapshot
Feature-detect and review static-array rules.
JavaScript
console.log({
supported: "ariaDescribedByElements" in Element.prototype,
tip: "Returned array is static/read-only; assigned arrays are copied",
pairsWith: "ariaLabelledByElements for the accessible name",
status: "Baseline Newly available (MDN, Apr 2025)"
});
Element.ariaDescribedByElements is Baseline Newly available (MDN: across latest browsers since April 2025). Feature-detect on older engines and keep an aria-describedby id fallback if needed. Logos use the shared browser-image-sprite.png sprite from this project.
✓ Baseline 2025
Element.ariaDescribedByElements
HTMLElement[] — reflected aria-describedby 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-describedby attribute
No
ariaDescribedByElementsBaseline
Bottom line: Detect "ariaDescribedByElements" in Element.prototype. Prefer element arrays for dynamic description text. Fall back to aria-describedby id strings when the property is missing. Re-assign arrays when description nodes change.
Wrap Up
Conclusion
ariaDescribedByElements lets you manage accessible descriptions with real Element references instead of only id strings. Feature-detect on older browsers, keep description text clear and up to date, and re-assign the array when the help nodes change.
Use descriptions for longer help, not the short name
Assign a fresh array when description nodes change
Keep id-based aria-describedby as a fallback
Keep description text accurate and concise enough to announce
❌ Don’t
Mutate a previously assigned array and expect updates
Assume every older browser exposes the IDL property
Duplicate the accessible name inside the description
Point to empty or unrelated elements
Confuse this with ariaControlsElements
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about ariaDescribedByElements
Reflected aria-describedby 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 an accessible description for the element. Join their inner text with spaces to form the description string.
No. MDN marks Element.ariaDescribedByElements 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.
An accessible label names the control (see ariaLabelledByElements). An accessible description adds longer help text—warnings, hints, or extra context.
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.ariaDescribedByElements for the same relationship from inside a component.
Did you know?
Description elements are often visually hidden with CSS while remaining in the accessibility tree—users who see the UI may rely on nearby visible hints, while screen reader users still hear the joined description text.