What's new Report an issue
GIG Cymru NHS Wales, Digital Health and Care Wales

Navigation

The persistent list down the left of an application: where staff are, and everywhere else they can go. Two types — Sectioned and Linear — and three widths.

The component is full height and sticky, because Figma draws it that way in every variant. The previews below take their height from the menu instead, so every destination is visible without scrolling a sidebar inside a page; that framing is the only thing this site changes about it.

Type: Sectioned — expanded

248px. Icon and label, with named groups a user would recognise (Patients, Clinical, Nursing). Use Sectioned only when those labels do real work — do not invent groups to justify it. A parent with children is a button with aria-expanded; a leaf is a link. Badges count things to act on, and nothing else.

<nav class="sr-nav" aria-label="Primary">
  <div class="sr-nav__header">…</div>
  <div class="sr-nav__body">
    <div class="sr-nav__section">
      <span class="sr-nav__section-label">Patients</span>
      <div class="sr-nav__list">
        <button class="sr-nav__item" aria-label="Patient Search">…</button>
      </div>
    </div>
  </div>
  <div class="sr-nav__footer">…</div>
</nav>

<!-- Collapsed states -->
<nav class="sr-nav sr-nav--rail">…</nav>       <!-- 108px, labels kept -->
<nav class="sr-nav sr-nav--collapsed">…</nav>  <!-- 48px, icon only -->

Collapsed — rail

108px. Not a truncated expanded row: the icon moves above the label, both centre, and the label drops to caption (12px) so "Patient Search" fits without truncating. Section labels, badges and chevrons are dropped — the rail is for recognition, not detail.

Collapsed — icon only

48px. No persistent label; the label is revealed on hover and on focus-visible. Both, not just hover — a keyboard user can reach an item but can never trigger hover, so hover alone fails SC 1.4.13. Products need not adopt every width: Case Note Tracking ships expanded and rail only.


The persistent list down the left of an application: where staff are, and everywhere else they can go.


When to use

When not to use

How it works

StateWidthBehaviour
Expanded248pxIcon + label, section labels shown (Sectioned only)
Collapsed, rail108pxIcon above a permanently visible centred label, 12px
Collapsed, icon only48pxIcon alone; label revealed on hover and focus

Do and don't

Accessibility

Open questions

Accessibility requirements

RequirementWCAG SCHow Single Record meets itTest method
Navigation landmark with a name1.3.1A real nav element labelled "Primary", once per page — the sidebar, not the header, is the primary navigation when both are present.Landmark review
Current destination is marked4.1.2aria-current="page" on the active item, not a bespoke active class, so it is announced and not only coloured.Screen reader announce
Collapsed items keep their name4.1.2Every item carries aria-label whatever the width, so the icon-only rail is never a set of unlabelled buttons.Screen reader, collapse first
Hidden labels reveal on focus, not only hover1.4.13 / 2.1.1The icon-only label appears on :hover AND :focus-visible. Hover alone is unreachable from the keyboard.Keyboard tab through collapsed nav
Expandable parents announce their state4.1.2Parents are buttons with aria-expanded; the submenu is hidden, not merely off-screen.Screen reader, expand and collapse
Collapse control says what it will do2.4.6"Expand navigation" / "Collapse navigation" — the outcome, not the glyph.Screen reader announce
Focus visible2.4.7SR cyan ring, inset so the rail edge cannot clip it.Keyboard tab at every width