ARIA tree Role
The tree role marks a hierarchical list whose items can be expanded and collapsed, such as the folder tree in a file browser.
Description
The tree role identifies a widget that shows a hierarchical list. Its items have the treeitem role, and any item with children holds them in an element with the group role. Parent items can be expanded and collapsed. Common examples are folder trees and table-of-contents navigation in documentation tools.
The tree is a single Tab stop. The arrow keys move between and open items, Home and End go to the first and last visible item, and typing a letter moves to the next item starting with it. Trees can support single or multiple selection with aria-selected. The tree needs an accessible name.
A tree is complex to build and not every user knows how to use one. For a short hierarchy of links, nested lists, perhaps with <details> elements to open and close sections, are often simpler and work just as well.
Properties
ARIA Attributes
- Required
- None
- Supported
aria-activedescendant,aria-errormessage,aria-invalid,aria-multiselectable,aria-orientation,aria-required- Prohibited
- None
- Global
- All global ARIA attributes can also be used, such as
aria-label,aria-labelledby,aria-describedby,aria-hidden.
Syntax
<element role="tree">
Example
Browser Support
The following information will show you the current browser support for the tree ARIA role. Hover over a browser icon to see the version that first introduced support for this ARIA role.
Desktop





Tablets & Mobile





