JavaScript Element ariaLabelledByElements Property
Beginner
⏱️ 12 min read
📚 Updated: Jul 2026
🎯 5 Examples
🚀 5 Try-it labs
Baseline 2025
Instance property
Overview
What You’ll Learn
Element.ariaLabelledByElements is an instance property that holds an array of elements providing an accessible name. Learn how it relates to aria-labelledby, why label 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
Element array
03
Writable
Yes (get / set)
04
Reflects
aria-labelledby
05
Status
Baseline 2025
06
Use for
Accessible names
Fundamentals
Introduction
Every control needs an accessible name. Often that name already exists as visible text on the page—a heading, a caption, or a short instruction next to a field. ARIA can point to those nodes with aria-labelledby.
ariaLabelledByElements is the modern element-reference form: you work with real DOM nodes instead of only managing id strings. Join their text with spaces to get the accessible name.
Prefer ariaLabelledByElements (or aria-labelledby) when the name is already visible. Use ariaLabel for a string name when there is no suitable visible text (for example an icon-only button).
Concept
Understanding the Property
MDN: the ariaLabelledByElements property of the Element interface is an array containing the element (or elements) that provide an accessible name for the element it is applied to. It is similarly intended to provide a label for elements that do not have a standard method for defining their accessible name.
Get / set — read or assign an array of elements.
Flexible alternative to the aria-labelledby attribute.
No id required on label nodes when you set the property (MDN).
Takes precedence over other ARIA label methods (MDN).
Reflection — reads valid in-scope id refs from the attribute; setting the property clears the attribute.
Foundation
📝 Syntax
JavaScript
ariaLabelledByElements
Value
An array of elements. The inner text of these elements can be joined with spaces to get the accessible name.
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-labelledby Attribute
Attribute
Property
API
aria-labelledby="id1 id2"
el.ariaLabelledByElements
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
📋 Input Labelled by Spans (MDN Shape)
MDN’s example links an input to two spans via aria-labelledby. The accessible name is the concatenation of both spans’ text, separated by a space:
JavaScript
<span id="label_1">Street name</span>
<input aria-labelledby="label_1 label_2" />
<span id="label_2">(just the name, no "Street" or "Road" or "Place")</span>
Detect support and read MDN’s street-name example.
Example 1 — Feature-Detect
Check whether the reflected property exists.
JavaScript
if ("ariaLabelledByElements" in Element.prototype) {
console.log("ariaLabelledByElements is supported");
} else {
console.log("ariaLabelledByElements not supported by browser");
}
Prefer the property in script when supported; keep id-based aria-labelledby as a markup fallback for older browsers.
Example 5 — Support Snapshot
Feature-detect and review static-array rules.
JavaScript
console.log({
supported: "ariaLabelledByElements" in Element.prototype,
tip: "Returned array is static/read-only; assigned arrays are copied",
pairsWith: "ariaDescribedByElements for longer help text",
status: "Baseline Newly available (MDN, Apr 2025)"
});
Element.ariaLabelledByElements is Baseline Newly available (MDN: across latest browsers since April 2025). Logos use the shared browser-image-sprite.png sprite from this project. Feature-detect on older browsers.
✓ Baseline Newly available
Element.ariaLabelledByElements
Element[] — reflects aria-labelledby for accessible name element references.
BaselineNewly available (2025)
Google ChromeSupported (reflected element refs)
Yes
Microsoft EdgeSupported (reflected element refs)
Yes
Mozilla FirefoxSupported (reflected element refs)
Yes
Apple SafariSupported (reflected element refs)
Yes
OperaFollow Chromium support
Yes
Internet ExplorerNo — use aria-labelledby + getElementById
No
ariaLabelledByElementsBaseline 2025
Bottom line: Use ariaLabelledByElements to point at elements that supply the accessible name. Prefer it when the name is already visible. Feature-detect, and keep aria-labelledby ids as a markup fallback when needed.
Wrap Up
Conclusion
ariaLabelledByElements reflects aria-labelledby as an array of elements so you can build accessible names from real DOM nodes—even without ids when you set the property. Prefer visible label text, feature-detect on older browsers, and use ariaLabel only when no suitable visible name exists.
Confuse name (labelled-by) with description (described-by)
Point to empty or unrelated nodes
Skip feature detection on older browsers
Forget that this property can override other naming methods
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about ariaLabelledByElements
Reflected element array for aria-labelledby accessible names.
5
Core concepts
📄01
Get / set
Element array
Kind
📝02
No id needed
when setting property
Flex
🔍03
Static copy
not a live array
Rule
✅04
Baseline 2025
feature-detect
Status
🎯05
Precedence
overrides other labels
MDN
❓ Frequently Asked Questions
An array of elements that provide an accessible name for the element. Join their inner text with spaces to form the accessible name string.
No. MDN marks Element.ariaLabelledByElements 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.
ariaLabel is a string name on the element itself. ariaLabelledByElements points to other elements whose text becomes the name. Prefer labelled-by when the name already exists as visible text on the page.
Yes. MDN notes the property takes precedence over all other methods of setting the ARIA label, including content and associated label elements.
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.
Did you know?
Because ariaLabelledByElements can take precedence over other naming methods, it is a powerful way to force a specific accessible name for widgets that would otherwise pull a name from their own text content—use that carefully so sighted and AT users stay aligned.