Manual Test Cases for ARIA Owns Invalid IDs - Test 1440

Test 1440: One or more elements, not intentionally hidden in the DOM and available to assistive technologies, has an aria-owns attribute value that includes one or more invalid ids.

Elements with aria-owns are outlined in purple. Invalid/non-existent IDs are highlighted in red, valid/existing IDs in green.

Test Logic:

Common Use Cases:

Purpose:

aria-owns defines explicit parent-child relationships in the accessibility tree that differ from the DOM hierarchy. This allows flexible widget structures where owned elements can be anywhere in the DOM. All referenced IDs must exist and be valid.

N/A Tests - Should Not Be Tested

Element without aria-owns attribute

Menu

Elements without aria-owns are not tested

Element with empty aria-owns attribute

Content

Empty aria-owns values are ignored

Hidden element with aria-owns (display:none)

Content

❌ Referenced ID "nonexistent" does not exist

Hidden elements are excluded from testing

Hidden element with aria-owns (visibility:hidden)

Content

❌ Referenced ID "nonexistent" does not exist

Visibility hidden elements are not tested

Element with aria-hidden="true" and aria-owns

❌ Referenced ID "nonexistent" does not exist

aria-hidden elements are not available to assistive technologies

PASS Tests - ARIA Owns Pointing to Valid, Existing IDs

Element with aria-owns pointing to existing ID

Menu

Menu owns an existing menuitem

Element with aria-owns pointing to multiple existing IDs

Tabs

Tablist owns multiple existing tabs

Listbox with aria-owns pointing to existing options

Select:
Option 1
Option 2

Listbox owns existing options

Grid with aria-owns pointing to existing rows

Grid
A1
B1
A2
B2

Grid owns existing rows

Tree with aria-owns pointing to existing treeitems

Tree
Node 1
Node 2

Tree owns existing treeitems

Menu with aria-owns pointing to existing menuitems

Menu

Menu owns existing menuitems

Element with aria-owns containing valid IDs with hyphens and underscores

Content
Item 1
Item 2

IDs with hyphens and underscores are valid

Element with aria-owns pointing to hidden element (element still exists)

Content

Owned element exists even though it's hidden - PASSES (element existence check only)

FAIL Tests - ARIA Owns Pointing to Non-existent IDs

Element with aria-owns pointing to non-existent ID

Content

❌ Referenced ID "nonexistent" does not exist

Element references non-existent ID - FAILS

Menu with aria-owns pointing to non-existent menuitem

❌ Referenced ID "missingItem" does not exist

Menu references non-existent menuitem - FAILS

Element with aria-owns containing mix of valid and non-existent IDs

Content
Item 1
Item 2

❌ Referenced ID "nonexistent" does not exist

One non-existent ID among valid IDs - FAILS

Listbox with aria-owns pointing to non-existent option

Select:
Option 1
Option 2

❌ Referenced ID "failOpt3" does not exist

Listbox references non-existent option - FAILS

Grid with aria-owns pointing to non-existent row

Grid
A1
A2

❌ Referenced ID "failRow3" does not exist

Grid references non-existent row - FAILS

Tree with aria-owns pointing to non-existent treeitem

Tree
Node 1
Node 2

❌ Referenced ID "missingNode" does not exist

Tree references non-existent treeitem - FAILS

HTML5 ID Format - IDs Starting with Numbers ARE Valid

Element with aria-owns containing ID starting with number (VALID in HTML5)

Content
Item

In HTML5, IDs CAN start with numbers - This is VALID and PASSES

Element with aria-owns containing spaces (creates multiple ID references)

Content

❌ "invalid id" contains spaces, interpreted as two separate IDs: "invalid" and "id" - both non-existent

Spaces separate multiple IDs - both are non-existent - FAILS

FAIL Tests - Edge Cases

Element with aria-owns with extra whitespace and non-existent ID

Content

❌ Referenced ID "nonexistent" does not exist (whitespace is trimmed)

Whitespace is trimmed - still detects non-existent ID - FAILS

Tablist with typo in owned tab ID

Tabs

❌ Referenced ID "tba2" does not exist (typo for "tab2")

Typo in ID reference - FAILS

FAIL Tests - Multiple Failures

Two elements with aria-owns pointing to non-existent IDs (2 failures)

Content 1
Content 2

❌ IDs "missing1" and "missing2" do not exist

Both elements reference non-existent IDs - 2 failures

Mix of passing and failing elements (1 failure)

Content 1
Content 2
Existing Item

❌ Referenced ID "nonexistent" does not exist

One valid, one invalid - 1 failure

Real World Examples

PASS: Proper composite widget with aria-owns

File

Menu properly owns submenu located elsewhere in DOM - PASSES

FAIL: Broken composite widget with non-existent owned element

❌ Referenced ID "missingSubmenu" does not exist

Menu references non-existent submenu - FAILS

PASS: Proper tablist with aria-owns for distant tabs

Tablist owns tabs in different DOM location - PASSES

FAIL: Tablist with one missing tab

Tabs

❌ Referenced ID "missingTab" does not exist

One tab missing - FAILS

PASS: Proper listbox owning options elsewhere in DOM

Countries:
USA
Canada
Mexico

Listbox owns options in separate container - PASSES

FAIL: Listbox with typo in owned option ID

Countries:
USA
Canada

❌ Referenced ID "otp2" does not exist (typo for "realOptB")

Typo in option ID - FAILS

PASS: Proper tree with aria-owns restructuring hierarchy

File Explorer
Documents
Work
Personal

Tree properly restructures parent-child relationships - PASSES

FAIL: Tree with broken ownership chain

File Explorer
Documents
Work

❌ Referenced ID "missingChild" does not exist

Nested aria-owns references non-existent element - parent treeitem FAILS

PASS: Grid owning rows from different sections

Data Grid
Name
Age
Alice
30
Bob
25

Grid owns rows from different DOM locations - PASSES

FAIL: Grid with incomplete row ownership

Data Grid
Col 1
Data 1
Data 2

❌ Referenced ID "gridRow3" does not exist

Grid references non-existent row - FAILS

FAIL Tests - Malformed (Whitespace-Only) aria-owns

Element with whitespace-only aria-owns (malformed — not caught by empty-string filter)

Content

❌ aria-owns contains only whitespace — produces empty token after split — FAILS

Whitespace-only aria-owns is malformed and not excluded by the :not([aria-owns=""]) filter — FAILS

Special Character IDs — Periods and Colons

PASS: aria-owns references ID containing a period (element exists)

Content
Item with period in ID

ID my.item exists — attribute selector [id='my.item'] finds it — PASSES

PASS: aria-owns references ID containing a colon (element exists)

Content
Item with colon in ID

ID ns:item exists — attribute selector [id='ns:item'] finds it — PASSES

FAIL: aria-owns references ID with period (element does NOT exist)

Content

❌ Referenced ID my.missing does not exist

ID my.missing not found in DOM — FAILS

FAIL: aria-owns references ID with colon (element does NOT exist)

Content

❌ Referenced ID ns:missing does not exist

ID ns:missing not found in DOM — FAILS