Skip to content

Add tentative WPT for flat ARIA tree accessibility subtree#60503

Open
HaTheo wants to merge 3 commits into
web-platform-tests:masterfrom
HaTheo:HaTheo/AriaTreeItems
Open

Add tentative WPT for flat ARIA tree accessibility subtree#60503
HaTheo wants to merge 3 commits into
web-platform-tests:masterfrom
HaTheo:HaTheo/AriaTreeItems

Conversation

@HaTheo

@HaTheo HaTheo commented Jun 9, 2026

Copy link
Copy Markdown

This PR adds a tentative test to establish and confirm expected browser conformance for flat ARIA tree structures as discussed in w3c/aria#2091.

Specifically, it introduces treeitems.tentative.html to verify that a flat DOM architecture utilizing role="tree" and role="treeitem" with explicit aria-level attributes correctly computes into the appropriate hierarchical accessibility subtree. This test defines a flat DOM tree of Fruits and Vegetables, with children Fruit (Apple, Pear, oranges) and Vegetables (Carrots, Broccoli, Spinach) respectively. It assigns aria-level="1" to top-level categories and aria-level="2" to their respective children, along with aria-setsize and aria-posinset properties consistent with the tree.

And utilizes AriaUtils.verifyAccessibilitySubtree to assert that the browser reflects the intended parent-child relationships and accessibility tree structure, despite the non-nested DOM layout tree items.

@spectranaut spectranaut left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is so awesome to see the new test functionality used for this!!

But I agree with your question on the spec change, I'm not sure if this means we should reorder the accessibility tree, it doesn't actually say in the spec. Let's wait for clarity on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants