w3c / aria

Accessible Rich Internet Applications (WAI-ARIA)
https://w3c.github.io/aria/
Other
654 stars 125 forks source link

Conflict between the tree and treeitem roles regarding Allowed Accessibility Child Roles and Required Accessibility Parent Roles. #2315

Closed giacomo-petri closed 3 months ago

giacomo-petri commented 3 months ago

The treeitem role has specific requirements for its accessibility parent roles:

A treeitem element can contain a sub-level group of elements that can be expanded or collapsed. An expandable collection of treeitem elements are enclosed in an element with the group role.

Authors MUST ensure elements with role treeitem are accessibility children of an element with role tree or an element with role group that is the accessibility child of an element with role treeitem.

On the other hand, the tree role allows certain accessibility child roles:

When these rules are combined, a conflict arises. While the tree role can have a group as a child, the treeitem role only permits a group as its parent if that group is itself a child of another treeitem. This creates a contradiction, as the tree allows for a group child, but the treeitem role does not allow a group as its parent unless it is nested under another treeitem.

Therefore, the tree role should only allow treeitem as its accessibility child role.

pkra commented 3 months ago

Is this a duplicate of #2094 / #2014 ?

giacomo-petri commented 3 months ago

@pkra thanks Closing as dup