ARIA treeitem Role
The treeitem role marks an item in a tree view, such as a folder in a file browser, which may contain a nested group of child items.
Description
The treeitem role identifies an item in a tree. Tree items are inside an element with the tree role, and an item that has children contains (or owns) an element with the group role that holds them. A parent item uses aria-expanded to show whether its children are visible; leaf items don't have the attribute.
Keyboard users expect the Up and Down arrows to move between visible items, Right to expand an item or move to its first child, and Left to collapse it or move to its parent. Only one item is in the Tab order at a time.
Use aria-selected or aria-checked for selection, and aria-level, aria-posinset and aria-setsize when not all items are in the DOM.
Properties
ARIA Attributes
- Required
- None
- Supported
aria-checked,aria-expanded,aria-haspopup,aria-level,aria-posinset,aria-selected,aria-setsize- Prohibited
- None
- Global
- All global ARIA attributes can also be used, such as
aria-label,aria-labelledby,aria-describedby,aria-hidden.
Syntax
<element role="treeitem">
Example
Browser Support
The following information will show you the current browser support for the treeitem ARIA role. Hover over a browser icon to see the version that first introduced support for this ARIA role.
Desktop





Tablets & Mobile





