Breadcrumb
A short trail of links above the heading that says where a page sits and gets you back up a level. It replaced the all-caps eyebrow.
What is a design token?
What is a design token?
---
import Breadcrumb from '@somnia/core/components/Breadcrumb.astro';
---
<Breadcrumb items={[
{ href: '/insights/', label: 'Insights' },
{ href: '/insights/?focus=Design%20systems', label: 'Design systems' },
]} />
<h1>What is a design token?</h1> When to use it
- On a page that sits inside a section: an article, a case study, a docs page, a yacht.
- To get back up a level, or to the same topic's list.
Use something else when:
- The page is a top-level one (Services, About): the main menu already marks it.
- You want a label above a heading for its own sake: don't. The all-caps eyebrow was retired; a heading stands on its own.
- The steps are a process someone is part-way through (a checkout): that is a progress indicator, not a breadcrumb.
How it works
- Ancestors only. List the levels above the page, not the page itself: the heading underneath already names it.
- Sentence case, body font. 14.5 px (15.5 px on phones), secondary text colour, links underlined so they look clickable. A slash separates the levels.
- Directly above the h1. The page-opening gap (16 px) attaches to a breadcrumb followed by a heading, on screen and in print, and the build-time layout check expects that order.
- A level with no page of its own is shown as plain text, not a link to the current page.
- A level that is hidden (marked
hidden) takes its slash with it. - Kept out of site search, so a page is found for its own words.
Do and don't
Do
- Use the same words as the menu and the section's heading
- Link each level to a real page
- Keep it to two or three levels
Don't
- Repeat the page's own title at the end
- Use it as a label with nowhere to go
- Write it in capitals
Accessibility
What it does for you
- A navigation landmark named "Breadcrumb", holding an ordered list, so a screen reader says what it is and how many levels there are.
- Each level is a real link, underlined as well as coloured. A level with no page of its own is plain text.
- The slashes are for the eye only: they are not read out.
- It names the levels above the page, not the page: the heading under it does that.
- Links are 20px high, with room round each one.
What you need to do
- The same words as the menu and the section’s heading.
- Levels in order, from the top down.
- The heading straight after it.
Keyboard
| Key | What it does |
|---|---|
| Tab | Moves through the links, in order. |
| Enter | Follows a link. |
What a screen reader is told
- "Breadcrumb, navigation", a list of two (or however many), then each link by its words.
This is what the browser reports to assistive technology. What each screen reader then says varies, and has not been listened to yet.
WCAG 2.2
| Criterion | Level | How this meets it |
|---|---|---|
| 1.3.1 Info and Relationships | A | A list inside a named landmark. |
| 1.4.1 Use of Color | A | Links are underlined. |
| 1.4.3 Contrast (Minimum) | AA | The secondary text colour against the page, in light and dark. |
| 2.4.4 Link Purpose (In Context) | A | Each link is the name of the level it goes to. |
| 2.4.8 Location | AAA | Says where the page sits in the site. |
| 2.5.8 Target Size (Minimum) | AA | Links are under 24px high and pass by the space between them. |
| 3.2.3 Consistent Navigation | AA | In the same place, above the heading, on every page that has one. |
The criteria this component has a part in. A page that uses it still has to meet the rest.
Checked
| Check | How | Result |
|---|---|---|
| Automated (axe-core) | WCAG 2.0, 2.1 and 2.2 rules at A and AA, the page in light and in dark | Passed Nothing found, light or dark |
| Narrow screen | No sideways scrolling at 320px wide (WCAG 1.4.10) | Passed No sideways scrolling |
| Keyboard and what the browser reports | Real key presses on the live example, and the role, name and state given to assistive technology | Passed 7 of 7 checks pass |
| On paper | Somnia’s print check: no overlaps, stranded headings or controls on the page | Passed No faults on 5 sheets |
| Screen reader | Listened to by a person, in VoiceOver and NVDA | Not yet Not yet checked by a person |
The 7 checks made with the keyboard, on the example at the top of this page:
- Passed It is a navigation landmark named "Breadcrumb", holding a list with one item for each level
- Passed Each level is a link named by its words
- Passed The slashes are not reported to a screen reader
- Passed Tab goes through the levels in order
- Passed The links are underlined, and have at least 4.5:1 against the page in light and dark
- Passed Each link has room round it: a 24px circle on one never reaches another
- Passed On real pages it comes straight before the main heading
Run by script on against Somnia DS 1.89.0, in Chromium with axe-core 4.14.0. How these checks work, and every component's results.
Not yet checked
- How it sounds in a screen reader (VoiceOver, NVDA, TalkBack) has not been checked by a person. The roles, names and states the browser reports are checked by script; what is actually spoken is not.
- Windows high contrast (forced colours) has not been looked at by a person.
- The slashes are silenced with a newer form of the CSS
contentproperty. A browser too old for it reads each slash out.
Evidence
Where it's used
| Where | For |
|---|---|
| mediadreams.co.uk | Insights (Insights / topic), case studies, every page of these docs and of the brand guidelines. |
| Headland Yachting | Destinations and Advice articles, yachts and yacht charter pages. |
| Somnia CMS | Every page: Your sites / the site / the section. |
What we saw, and what changed
| When | What we saw | What changed |
|---|---|---|
| Pages inside a section opened with an all-caps label above the heading that named the section and went nowhere. | The breadcrumb took its place: the same words as links, in sentence case (1.7.0). | |
| Breadcrumbs were part of what site search read. | They are kept out of the index (1.10.0). | |
| A level that was hidden left its slash behind. | A hidden level takes its slash with it (1.60.0). | |
| This page said the slashes aren’t read out. The browser reported each one as text, so a screen reader would say "slash" between levels. And in these docs the example’s links took the docs’ own link colour, not the breadcrumb’s. | The slashes are silent, and a live example keeps its component’s own links (1.83.0). |
From building and using it on real sites, each entry taken from the changelog or the build's own notes. This is observation by the studio and its clients, not research sessions with users.
What it rests on
- ARIA Authoring Practices: Breadcrumb: A breadcrumb trail goes in a labelled navigation landmark; marking the current page is only needed when it is a link in the trail.
What we don't know yet
- Whether people use it to go up a level, or use the menu and Back, is not counted.