An option item of a tree. This is an element within a tree that may be expanded or collapsed if it contains a sub-level group of tree item elements.
A collection of treeitem elements to be expanded and collapsed are enclosed in an element with the group role.
Authors MUST ensure elements with role treeitem are contained in, or owned by, an element with the role group or tree.
In the following code sample, because the anchor (HTML a element) is acting as the treeitem, the list item (HTML li element) is assigned an explicit WAI-ARIA role of presentation to override the user agent’s implicit native semantics for list items.
<a role=”treeitem” aria-expanded=”true”>An expanded tree node</a>
Required Context Role
Inherited States and Properties
- aria-busy (state)
- aria-checked (state)
- aria-current (state)
- aria-disabled (state)
- aria-expanded (state)
- aria-grabbed (state)
- aria-hidden (state)
- aria-invalid (state)
- aria-selected (state) (required)
Accessible Name Required
No HTML element equivalent.
- W3C (opens new window)