WAI-ARIA: Role=Treegrid
Description
A grid whose rows can be expanded and collapsed in the same manner as for a tree.
If aria-readonly is set on an element with role treegrid, user agents MUST propagate the value to all gridcell elements owned by the treegrid and expose the value in the accessibility API. An author MAY override the propagated value of aria-readonly for an individual gridcell element.
When the aria-readonly attribute is applied to a focusable gridcell, it indicates whether the content contained in the gridcell is editable. The aria-readonly attribute does not represent availability of functions for navigating or manipulating the treegrid itself.
In a treegrid that provides content editing functions, if the content of a focusable gridcell element is not editable, authors MAY set aria-readonly to true on the gridcell element. However, if a treegrid presents a collection of elements that do not support aria-readonly, such as a collection of link elements, it is not necessary for the author to specify a value for aria-readonly.
To be keyboard accessible, authors SHOULD manage focus of descendants for all instances of this role, as described in Managing Focus.
Example
Example coming soon
Characteristics
Superclass Role
- grid
- tree
Required Owned Elements
- row
- rowgroup → row
Inherited States and Properties
- aria-activedescendant
- aria-atomic
- aria-busy (state)
- aria-colcount
- aria-controls
- aria-current (state)
- aria-describedby
- aria-details
- aria-disabled (state)
- aria-dropeffect
- aria-errormessage
- aria-expanded (state)
- aria-flowto
- aria-grabbed (state)
- aria-haspopup
- aria-hidden (state)
- aria-invalid (state)
- aria-keyshortcuts
- aria-label
- aria-labelledby
- aria-live
- aria-multiselectable
- aria-orientation
- aria-owns
- aria-readonly
- aria-relevant
- aria-required
- aria-roledescription
- aria-rowcount
Name From
- author
Accessible Name Required
- True
Semantic HTML
No HTML element equivalent.
Reference
- WAI-ARIA 1.2 Specification
Refer to the notes from the WAI-ARIA 1.2 specification for more information on role=treegrid.
How widely is this supported?
Hi Dave,
Not sure, I did not come across any implementation of this component in my entire career. Some of these complex widgets are avoided by design teams and they also cause significant usability challenges for people with disabilities.