Writing & StyleStyle guide

Writing Accessible Tree Labels

Writing Accessible Tree Labels records a distinct W3C APG-supported wording task while keeping implementation mechanics outside the writing guidance.

Quick answer

Give a tree widget a concise accessible name that identifies the hierarchy or task the tree represents.

Key details

Core IssueW3C APG requires an accessible name for a tree widget so users can identify the hierarchy they are navigating.
Registerweb accessibility and interface content

Important caveats

Scope Boundary

This page covers the tree container name; tree-item labels, expansion state, selection, and keyboard navigation are separate concerns.

Further guidance

Content

Give the tree a concise label that identifies the hierarchy or task it represents, such as a site section, file collection, or navigation structure.

Practical Application

Give the tree a concise name for the hierarchy or task it represents and keep that container name separate from individual tree-item labels.

Purpose

A purpose-based tree name gives context to the nested tree items before users navigate through the hierarchy.

Reader Check

Before navigating the items, would a user understand what collection or hierarchy the tree contains?

Worked Example

Example: Label a folder hierarchy “Project files” rather than the generic name “Tree.”

Sources and evidence

Sources are shown with the role they play in this guide. Historical or style-sensitive claims are kept within the evidence boundary described above.

  1. Tree View Pattern — WAI-ARIA Authoring Practices Guide (opens in a new tab)World Wide Web Consortium (W3C) · W3C APG guidance for accessible naming of tree widgets.

Explore the topic