Favorites

ARIA treegrid Role

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

The treegrid role marks a grid whose rows can be expanded and collapsed like a tree, such as an email inbox that groups messages into threads.

☕
Enjoying this site?

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

Buy us a coffee

Description

The treegrid role identifies a grid whose rows can be expanded and collapsed in the same way as a tree. It combines the two patterns: the columns of a grid with the hierarchy of a tree. Email threads, project tasks with subtasks and file lists with details columns are typical uses.

Rows have the row role, and a row with children has aria-expanded. Since the rows are siblings in the DOM, use aria-level, aria-posinset and aria-setsize to describe the hierarchy. The keyboard combines grid and tree behavior: arrow keys move between cells, and Right/Left on the first cell expand and collapse a row.

Tree grids are among the most complex ARIA patterns, so make sure the extra complexity is worth it for your users.

Properties

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

ARIA Attributes

Syntax

<element role="treegrid">

Example

<table role="treegrid" aria-label="Inbox">
<tr role="row" aria-level="1" aria-expanded="true">
<td role="gridcell" tabindex="0">Project update (2)</td><td role="gridcell">Sam</td>
</tr>
<tr role="row" aria-level="2">
<td role="gridcell" tabindex="-1">&nbsp;&nbsp;Re: Project update</td><td role="gridcell">Alex</td>
</tr>
</table>

Browser Support

The following information will show you the current browser support for the treegrid 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