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:
- Tests for elements with
aria-owns attribute containing invalid ID references
- Invalid IDs include:
- Non-existent: IDs that don't exist in the DOM
- Note: In HTML5, IDs CAN start with numbers (e.g.,
id="123abc" is valid)
- HTML5 ID rules: Must contain at least one character, cannot contain spaces
- Elements must not be intentionally hidden (display:none, visibility:hidden, aria-hidden="true")
- Elements must be available to assistive technologies
- Empty
aria-owns values are ignored
- The attribute can contain multiple space-separated IDs - fails if ANY referenced ID is invalid/non-existent
Common Use Cases:
- Menus owning submenus located elsewhere in the DOM
- Tablists owning tabs that are not direct children
- Listboxes owning options in a different DOM location
- Grids owning rows that are outside the grid element
- Trees restructuring parent-child relationships in the accessibility tree
- Composite widgets managing ownership of descendant elements
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
Elements without aria-owns are not tested
Element with empty aria-owns attribute
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
Content
❌ 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 owns an existing menuitem
Element with aria-owns pointing to multiple existing IDs
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 owns existing rows
Tree with aria-owns pointing to existing treeitems
Tree owns existing treeitems
Menu with aria-owns pointing to existing menuitems
Menu owns existing menuitems
Element with aria-owns containing valid IDs with hyphens and underscores
IDs with hyphens and underscores are valid
Element with aria-owns pointing to hidden element (element still exists)
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
Menu
Item 1
❌ 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
❌ 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)
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
Tab 1
Tab 2
Tab 3
❌ 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
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
Tab 1
Tab 2
❌ Referenced ID "missingTab" does not exist
One tab missing - FAILS
PASS: Proper listbox owning options elsewhere in DOM
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
Grid owns rows from different DOM locations - PASSES
FAIL: Grid with incomplete row ownership
Data Grid
❌ 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