Favorites

ARIA treeitem Role

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

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.

☕
Enjoying this site?

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

Buy us a coffee

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

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

ARIA Attributes

Syntax

<element role="treeitem">

Example

<ul role="tree" aria-label="Files" style="list-style:none">
<li role="treeitem" aria-expanded="true" tabindex="0">src
<ul role="group" style="list-style:none">
<li role="treeitem" tabindex="-1">app.js</li>
<li role="treeitem" tabindex="-1">style.css</li>
</ul>
</li>
<li role="treeitem" tabindex="-1">README.md</li>
</ul>

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.

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