Skip to main content

Design system components

SiteTree

Hierarchical sitemap with collapsible folder branches and page leaves.

Status: stable. Group: navigation. Markdown version: /design-system/components/site-tree.md

When to use

Collapsible sitemap tree (folders and page leaves) for the human-readable sitemap page.

When not to use

  • Do not use as the primary site header navigation; use NavMenuList / SiteHeader instead.
  • Do not nest more than three levels without testing keyboard focus order.

Look-alikes

  • NavMenuList: Do not use as the primary site header navigation; use NavMenuList / SiteHeader instead.
  • SiteHeader: Do not use as the primary site header navigation; use NavMenuList / SiteHeader instead.
  • TableOfContents: Do not use for global site navigation; use NavMenuList or SiteTree instead.

Props

SiteTree props
PropTypeDefaultDescriptionRequired
nodesSiteTreeNode[]noneNo description in the contract.Yes
aria-labelstringnoneAccessible name for the navigation landmark. Defaults to the translated "Sitemap" (sitemapTreeLabel).No
defaultExpandAllbooleanfalseExpand all branch nodes by default.No
classNamestringnoneNo description in the contract.No

Variants

No variant dimensions and no props with a fixed set of values.

Invalid combinations

The contract records no invalid combinations.

Keyboard

SiteTree keyboard behaviour
KeyBehaviour
TabMoves focus to the control and on to the next focusable element. (standard)
EnterActivates the focused control. (standard)
SpaceActivates or toggles the focused control. (standard)

Rows marked (standard) name a key the contract lists without a description; the behaviour shown is the usual one for that key.

Rules

Every item under When not to use is a MUST NOT. MUST and SHOULD follow RFC 2119.

SiteTree rules
LevelRuleHow it is checked
MUSTARIA: Nav landmark.Not yet verified: no evidence record. WCAG 4.1.2.
MUSTARIA: Aria-label.Not yet verified: no evidence record. WCAG 4.1.2.
MUSTARIA: Native details/summary for branch toggles.Not yet verified: no evidence record. WCAG 4.1.2.
MUSTRequired stories produce no axe violations at the configured severity.Automated by npm run test:stories:matrix:ci. WCAG 2.5.8.
MUSTThe accessibility tree (role, name, state) matches the committed snapshot for every required story.Automated by npm run test:stories:matrix:ci. WCAG 1.3.1, 4.1.2.
MUSTThe component remains legible and operable under a real browser forced-colors: active pass.Automated by npm run test:stories:hc.
MUSTEvery documented keyboard interaction works as specified.Not yet verified: no evidence record. WCAG 2.1.1, 2.1.2.
MUSTA human completed an end-to-end accessibility review of this component.Manual review, last on 2026-11-04.

Install and import

  • In-repo only. SiteTree is not exported from @digitaltableteur/react, so there is no public import path.