JavaScript Element ariaOwnsElements Property

Beginner
5 min read
Updated: Nov 2026
3 examples
Property

Definition

In JavaScript, ariaOwnsElements is an array of elements that define a visual, functional, or contextual ownership relationship when the DOM hierarchy cannot express it for assistive technology (MDN).

Read the notes below before you get or set this property. Prefer feature detection when support is limited.

Syntax

Use el.ariaOwnsElements. Start with this line.

JavaScript
element.ariaOwnsElements
CallWhat it does
element.ariaOwnsElementsPrimary signature.

Built into the browser. Read or assign el.ariaOwnsElements — no import required.

Library declarations
JavaScript
element.ariaOwnsElements

Parameters

ParameterDescription
Owning elementRequired. Parent in the accessibility tree
Owned element(s)Required. Treated as children for AT
Custom elementsOptional. ElementInternals.ariaOwnsElements

Return Value

Return ValueDescription
*The current value of el.ariaOwnsElements.

JavaScript Examples

Example 1 — Read from aria-owns (MDN)

Feature-detect, then log the attribute and the reflected element array.

JavaScript
if ("ariaOwnsElements" in Element.prototype) {
  const menu = document.getElementById("parentMenu");
  console.log(menu.getAttribute("aria-owns"));
  menu.ariaOwnsElements.forEach((el) => {
    console.log(el.id);
  });
} else {
  console.log("not supported");
}
Try It Yourself

How It Works

  1. Feature-detect. Limited availability — check the prototype first.
  2. Read the attribute. Space-separated id list from HTML.
  3. Read the property. Matching in-scope elements as an array.
  4. Log each id. Confirms which nodes are treated as owned.

Example 2 — Set Ownership Without an id

Assign element references; the property clears aria-owns.

JavaScript
const menu = document.getElementById("parentMenu");
const sub = document.getElementById("subMenu1");
if ("ariaOwnsElements" in Element.prototype) {
  menu.ariaOwnsElements = [sub];
  console.log(menu.getAttribute("aria-owns")); // null
  console.log(menu.ariaOwnsElements.length);   // 1
}
Try It Yourself

How It Works

  1. Get both elements. Owner and owned node references.
  2. Assign an array. No id is required on the owned element for the property.
  3. Attribute clears. MDN: setting the property clears aria-owns.
  4. Read length. Confirms one owned element remains on the property.

Example 3 — Assigned Array Is Copied

Mutating the local array later does not change the property (MDN).

JavaScript
const menu = document.getElementById("parentMenu");
const a = document.getElementById("subMenu1");
const b = document.getElementById("other");
if ("ariaOwnsElements" in Element.prototype) {
  const arr = [a];
  menu.ariaOwnsElements = arr;
  arr.push(b); // does not update the property
  console.log(menu.ariaOwnsElements.length); // 1
}
Try It Yourself

How It Works

  1. Build a local array. Start with one owned element.
  2. Assign it. The browser copies the array into the property.
  3. Push later. Local mutation does not update ownership.
  4. Reassign if you need to change the owned set.

Browser Support

Element.ariaOwnsElements has Limited availability on MDN (not Baseline). It is not Deprecated, Experimental, or Non-standard — still feature-detect. Logos use the shared browser-image-sprite.png sprite from this project.

✓ Limited availability

Element ariaOwnsElements

Element-reference form of aria-owns — ownership when DOM nesting is missing.

Limited Not Baseline
Google Chrome Modern support · Check current MDN
Check MDN
Mozilla Firefox Modern support · Check current MDN
Check MDN
Apple Safari Modern support · Check current MDN
Check MDN
Microsoft Edge Chromium-based · Check current MDN
Check MDN
Opera Chromium-based · Check current MDN
Check MDN
Internet Explorer No ariaOwnsElements
Not supported
ariaOwnsElements Feature-detect

Bottom line: Always feature-detect. Prefer real DOM nesting when possible; use aria-owns / ariaOwnsElements only for relationships the DOM cannot express. See the MDN Element.ariaOwnsElements reference.

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.

Next: Element ariaPlaceholder

Learn how textboxes expose placeholder hints to assistive technology.

ariaPlaceholder tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

11 people found this page helpful