Breadcrumb
Native controls work. Demo links and submissions stay inside this specimen. This example scrolls horizontally at this width.
Source markup
<!-- @dsCard group="Display" height=80 -->
<!DOCTYPE html>
<html lang="en-GB">
<head>
<meta charset="utf-8">
<title>Breadcrumb</title>
<style>
/* Layout of the demo states only. Colour and type come from bundle.css. */
.demo {
display: grid;
grid-template-columns: max-content minmax(0, 1fr);
align-items: center;
column-gap: var(--space-md);
row-gap: var(--space-2xs);
max-width: 960px;
padding: var(--space-2xs);
}
/* .breadcrumb clears the list markers with list-style: none but leaves the
browser's default list indent, so the demo zeroes it. */
.demo .breadcrumb { padding-inline-start: 0; }
/* Static copies of the live rules: .breadcrumb a:hover and the
:focus-visible floor, both copied from bundle.css. */
.breadcrumb a.is-hover { color: var(--color-semantic-accent-primary); }
.breadcrumb a.is-focus { outline: var(--focus-width) solid var(--focus-ring); outline-offset: var(--focus-offset); }
</style>
</head>
<body>
<div class="demo">
<p class="t-label">Rest</p>
<nav aria-label="Breadcrumb">
<ol class="breadcrumb">
<li><a href="/">Home</a></li>
<li><a href="/about/">About</a></li>
<li><span aria-current="page">Scope</span></li>
</ol>
</nav>
<p class="t-label">Focus (Home), hover (About)</p>
<nav aria-label="Breadcrumb, static states">
<ol class="breadcrumb">
<li><a class="is-focus" href="/">Home</a></li>
<li><a class="is-hover" href="/about/">About</a></li>
<li><span aria-current="page">Scope</span></li>
</ol>
</nav>
</div>
</body>
</html>
Breadcrumb is the mono trail above a page title, naming the pages above the current one.
Use it two or more levels below the root: the scope page under About, a journal post under a tag. Do not use it on the home page or a single-level page, or as a replacement for .site-nav. It carries no action of its own.
What the consumer provides
Section titled “What the consumer provides”A <nav aria-label="Breadcrumb"> wrapping an <ol class="breadcrumb">, one <li> per level, ancestors as <a> with real href values, and the current page as plain text. The separator is not markup: .breadcrumb li + li::before inserts a slash in color-semantic-text-faint. That faint slash is a path separator, never the Noiz product separator < of names like Noiz < Send. .breadcrumb sets list-style: none but keeps the browser’s default indent, so the consumer zeroes padding-inline-start. Inside .section the trail takes a space-md bottom margin.
States
Section titled “States”Rest. font-family-mono at font-scale-sm in color-semantic-text-muted, items wrapping with a space-2xs gap.
Hover. .breadcrumb a moves to color-semantic-accent-primary. Colour alone carries it, because the class sets text-decoration: none after the base a:hover rule.
Focus. Links take the base :focus-visible outline: focus-width solid focus-ring, offset by focus-offset. Do not swap in shadow-focus-ring, which bundle.css scopes to .btn, .input and .back-to-top.
Accessibility
Section titled “Accessibility”- Role. A native
<ol>inside<nav>; no ARIA role is added. The current page is plain text witharia-current="page", never a link. - Name. The
aria-label="Breadcrumb"on the<nav>; each link is named by its own text. - Keyboard. Tab reaches each ancestor link and Enter follows it. Space, Escape and the arrow keys do nothing: this is not a widget.
- Target size. The ancestor links are the only targets. bundle.css gives
.breadcrumb ano padding and no minimum height, so the hit area is thefont-scale-smline box, under the 24px floor of WCAG 2.2 SC 2.5.8; a consumer meeting it adds block padding. - Announcement. None. The trail is static and needs no live region.
Do and do not
Section titled “Do and do not”Do keep labels to the page titles, short enough for one line. Do leave color-semantic-text-faint to the decorative separator: a label in that colour fails AA at this size. Do not put the only copy of a fact in the trail: @media print hides .breadcrumb. Do not link the last item or add a trailing slash after it.
Hand-written from themes/noiz/assets/css/components.css (.breadcrumb).