Favorites

ARIA tree Role

tree
ARIA Composite Widget RoleThis ARIA role is supported by all modern browsers.
Updated 28th November 2026

The tree role marks a hierarchical list whose items can be expanded and collapsed, such as the folder tree in a file browser.

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee

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

Category
Composite Widget
HTML equivalent
None
Accessible name from
author
Required parent role
None
Required child roles
group, treeitem

ARIA Attributes

Syntax

<element role="tree">

Example

<ul role="tree" aria-label="Documents" style="list-style:none">
<li role="treeitem" aria-expanded="true" tabindex="0">Work
<ul role="group" style="list-style:none">
<li role="treeitem" tabindex="-1">Report.docx</li>
</ul>
</li>
<li role="treeitem" aria-expanded="false" tabindex="-1">Personal
<ul role="group" hidden><li role="treeitem" tabindex="-1">Recipes.txt</li></ul>
</li>
</ul>

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.

This ARIA role is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee