Breadcrumb (Design Guide)
Overview
Breadcrumbs are navigation landmarks used to show a user’s location within a website or application.
Use Cases
A <breadcrumb /> trail consists of a list of links to the parent pages of the current page in hierarchical order. It helps users find their place within a website or web application. Breadcrumbs are often placed horizontally before or as the first component of a page’s main content.
Prior Art/Examples
Anatomy
Diagram
Structure
<breadcrumb>- The root element that has the semantics of a navigation [required]<ordered-list>- The list containing items and dividers [required]<list-item>- The wrapper to items or divider content [required]
Proposed HTML:
<nav>
<ol>
<li><a>Item 1</a></li>
<li aria-hidden="true">/</li>
<li><a>Item 2</a></li>
</ol>
</nav>Accessibility
The Breadcrumb is composed by:
- A
navequivalent wrapper that should always havearia-labeloraria-labelledby, though this may be redundant if we provide additional context to thenavelement. - An ordered
list liitems and dividers where thelirepresenting the item can contain anchor or other elements and thelirepresenting the divider should havearia-hidden="true"- The link or non-interactive element to the current page has
aria-current=page.
Resources
- Breadcrumb design pattern example
- ARIA Best Practices for Breadcrumb
- MDN Breadcrumb Navigation
- aria-current explainer
- Accessible breadcrumb navigation pattern
Open UI