treeitem

Role for a tree list item.

Time to read: less than 5 min

Briefly

Independent widget role from WAI-ARIA for an item in a tree list.

In a tree list, the hierarchy of elements is visible. Such lists are encountered in file systems, where folders and their nesting are visible.

There is no tag with such a role in HTML.

How to write

Assign role="treeitem" to any tag, preferably <div>, <span> or <li>.

An element with treeitem must be inside tree.

Elements with the role treeitem can have all global ARIA attributes and some widget attributesaria-disabled, aria-expanded, aria-haspopup, aria-level, aria-checked, aria-posinset, aria-selected and aria-setsize.