Skip to main content

SideNav

Organismbeta@macaw-ds/ui · since 0.1.0

The product's primary navigation in the left column of AppShell. Not for sections within a page; that is TabNav.

Contract

From the manifest's a11y block: what assistive technology sees, and every key the component handles.

Role
navigation, containing lists of links
Focusable
Yes. Uses the shared focus ring.
Accessible name
The landmark takes its name from aria-label; each group list from its visible title (aria-labelledby); each item from its text. Group titles are not headings, so they do not interrupt the page outline.
Notes
  • The active item has aria-current="page" and a tinted background plus accent text, so selection is not shown by colour of one property alone.
  • Icons are decorative; the label always names the item.
Keyboard
KeysBehaviour
Tab

move between items (each is a link)

Enter

follow the link

Motion

What moves
Item background and text colour ease on hover.
Tokens
duration.fastease.standard
Reduced motion
Every token above collapses to 0 ms (and the spin animation to none) under the OS preference or inside any data-motion="reduced" scope. The component has no motion code of its own.

Contrast

Computed at build time from the token values, against the background each colour is paired with.

TokenOnLightDark
status.accent-fgstatus.accent-bg9.47:1 AAA11.54:1 AAA
fg.secondarysurface.layer-110.00:1 AAA13.28:1 AAA
fg.primarysurface.layer-119.67:1 AAA18.84:1 AAA
fg.mutedsurface.layer-16.53:1 AA6.33:1 AA
focus.ringsurface.layer-16.00:1 AA6.72:1 AA