Element.ariaOwnsElements is an instance property that holds an array of elements owned by the current element when the DOM tree cannot express that relationship. Learn how it relates to aria-owns, why owned nodes 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-owns
05
Status
Limited availability
06
Use for
Ownership links
Fundamentals
Introduction
Assistive technologies usually learn “what belongs to what” from the DOM: a submenu nested inside a menu, a panel inside a dialog. Sometimes layout or framework constraints force related nodes to sit as siblings (or farther apart). Then the tree no longer tells the ownership story.
aria-owns fills that gap. ariaOwnsElements is the modern element-reference form: you work with real DOM nodes instead of only managing id strings.
JavaScript
if ("ariaOwnsElements" in Element.prototype) {
const owned = parentMenu.ariaOwnsElements;
owned.forEach((elem) => console.log(elem.id));
}
💡
Beginner tip (MDN)
Prefer real DOM nesting when you can. Use aria-owns / ariaOwnsElements only when the ownership relationship cannot be represented in the hierarchy. Feature-detect—support is limited and not Baseline yet.
Concept
Understanding the Property
MDN: the ariaOwnsElements property of the Element interface is an array containing the element (or elements) that define a visual, functional, or contextual relationship between a parent element that it is applied to, and its child elements. This is used when the DOM hierarchy cannot be used to represent the relationship, and it would not otherwise be available to assistive technology.
Get / set — read or assign an array of elements.
Flexible alternative to the aria-owns attribute.
No id required on owned nodes when you set the property (MDN).
Reflection — reads valid in-scope id refs from the attribute; setting the property clears the attribute.
Limited availability — feature-detect before use (MDN).
Foundation
📝 Syntax
JavaScript
ariaOwnsElements
Value
An array of subclasses of HTMLElement—the owned element(s).
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-owns Attribute
Attribute
Property
API
aria-owns="id1 id2"
el.ariaOwnsElements
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
📋 Menu Owns Submenu (MDN Shape)
MDN’s example links a menubar to a separate submenu. They are not nested, so ownership is declared with aria-owns:
You could also set the same relationship with parentMenu.ariaOwnsElements = [subMenu1] when the property is supported. Related reflected-element APIs: ariaLabelledByElements and ariaDescribedByElements.
Cheat Sheet
⚡ Quick Reference
Goal
Code / note
Feature-detect
"ariaOwnsElements" in Element.prototype
Read
el.ariaOwnsElements
Write
el.ariaOwnsElements = [owned]
List owned ids
arr.forEach((e) => console.log(e.id))
Attribute form
aria-owns="subMenu1"
MDN status
Limited availability (not Baseline)
Snapshot
🔍 At a Glance
Four facts about Element.ariaOwnsElements.
Kind
get / set
Instance
Type
Element[]
Static copy
ARIA
aria-owns
Reflected
Support
limited
Feature-detect
Hands-On
Examples Gallery
Examples follow MDN Element: ariaOwnsElements. Labs feature-detect first so unsupported browsers still show a clear message.
📚 Getting Started
Detect support and read MDN’s menu ownership example.
Example 1 — Feature-Detect
Check whether the reflected property exists.
JavaScript
if ("ariaOwnsElements" in Element.prototype) {
console.log("ariaOwnsElements is supported");
} else {
console.log("ariaOwnsElements not supported by browser");
}
The property resolves valid in-scope id references from aria-owns into real element objects so you can inspect ownership without parsing id strings by hand.
📈 Set Array, Attribute Sync & Snapshot
Assign owned nodes without ids and verify reflection rules.
Example 3 — Set Owned Array
Assign an owned element that has no id; the attribute is cleared after set.
Prefer the property in script when supported; keep id-based aria-owns as a markup fallback for browsers without the IDL property.
Example 5 — Support Snapshot
Feature-detect and review static-array rules.
JavaScript
console.log({
supported: "ariaOwnsElements" in Element.prototype,
tip: "Returned array is static/read-only; assigned arrays are copied",
prefer: "Real DOM nesting when possible; aria-owns only when needed",
status: "Limited availability (MDN, not Baseline)"
});
{
"supported": true,
"tip": "Returned array is static/read-only; assigned arrays are copied",
"prefer": "Real DOM nesting when possible; aria-owns only when needed",
"status": "Limited availability (MDN, not Baseline)"
}
How It Works
Re-assign a fresh array when owned nodes change. Do not mutate an old array and expect the relationship to update.
Applications
🚀 Common Use Cases
Menus whose submenus live outside the parent node for layout reasons.
Composite widgets where owned panels are portals or siblings in the DOM.
Dynamic UIs that attach owned nodes without assigning ids.
Teaching how AT discovers ownership when the tree alone is incomplete.
Custom elements via ElementInternals.ariaOwnsElements.
Under the Hood
🔧 How It Works
1
Related nodes are not nested
DOM alone cannot express the ownership relationship.
Gap
2
You declare ownership
Via aria-owns ids or an element array.
Wire
3
Browser resolves element references
Valid in-scope refs become the property array.
Resolve
4
✓
Assistive tech sees the owned children
Ownership is available even without DOM nesting.
Important
📝 Notes
Not Deprecated, Experimental, or Non-standard on MDN—but limited availability (feature-detect).
Prefer real DOM nesting; use ownership only when the tree cannot represent the relationship.
Returned arrays are static/read-only; assigned arrays are copied.
Element.ariaOwnsElements has limited availability on MDN (not Baseline yet—does not work in some widely used browsers). Logos use the shared browser-image-sprite.png sprite from this project. Always feature-detect.
✓ Limited availability
Element.ariaOwnsElements
Element[] — reflects aria-owns for ownership element references.
LimitedNot Baseline yet
Google ChromeCheck current support (reflected element refs)
Partial
Microsoft EdgeCheck current support (reflected element refs)
Partial
Mozilla FirefoxCheck current support (reflected element refs)
Partial
Apple SafariCheck current support (reflected element refs)
Partial
OperaFollow Chromium support
Partial
Internet ExplorerNo — use aria-owns + getElementById
No
ariaOwnsElementsLimited
Bottom line: Use ariaOwnsElements to point at owned elements when DOM nesting cannot express ownership. Prefer real nesting when possible. Feature-detect, and keep aria-owns ids as a markup fallback when needed.
Wrap Up
Conclusion
ariaOwnsElements reflects aria-owns as an array of elements so you can declare ownership from real DOM nodes—even without ids when you set the property. Prefer nesting when possible, feature-detect on browsers with limited support, and keep id-based markup as a fallback.
Use ownership only when hierarchy cannot express it
Re-assign a new array when owned nodes change
Keep aria-owns ids as a markup fallback
❌ Don’t
Mutate a returned array and expect updates
Use aria-owns as a substitute for good structure
Point to unrelated or discarded nodes
Skip feature detection on older or incomplete browsers
Forget that setting the property clears the attribute
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about ariaOwnsElements
Reflected element array for aria-owns ownership links.
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
Limited support
feature-detect
Status
🎯05
Prefer nesting
owns is a fallback
MDN
❓ Frequently Asked Questions
An array of elements that define a visual, functional, or contextual ownership relationship with the parent element. Use it when the DOM hierarchy cannot represent that relationship for assistive technology.
No. MDN does not mark Element.ariaOwnsElements as Deprecated, Experimental, or Non-standard. It has limited availability (not Baseline yet), so feature-detect before use.
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.
Only when ownership cannot be expressed by normal DOM nesting. Prefer real parent/child structure when possible. Common teaching example: a menu and a submenu that are sibling nodes in the DOM.
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.
They need ids only when you use the aria-owns attribute. When you assign ariaOwnsElements = [elem], the elements do not require an id attribute.
Did you know?
MDN’s menu example deliberately places an unrelated sibling between the menubar and the submenu so the ownership gap is obvious. In production you would often nest the submenu—aria-owns is the escape hatch when nesting is not practical.