Breadcrumbs are a navigational landmark that let the user discover their current position in the site hierarchy and provide a means to navigate upwards through that hierarchy.
The term 'breadcrumbs' comes from the trail of breadcrumbs left by Hansel and Gretel in the popular fairytale.
Updated: Oct 14th, 2020 (replaced CSS generated content with inline SVGs)
Experience the breadcrumbs pattern in action on our companion eBay MIND patterns examples website.
Examine the required markup structure in our Bones GitHub project.
View a fully styled example on our eBay Skin website.
breadcrumbs the pattern as a whole, comprised of the following sub-parts
breadcrumb item: a link
separator: the graphical symbol that separates each breadcrumb
Breadcrumbs are typically used as secondary navigation on sites that are organized in a hierarchical manner.
An SVG symbol is used to separate each breadcrumb link.
The last breadcrumb link, representing the current place in the hierarchy, is non-interactive.
Breadcrumbs must have a heading of 'You are here', or words to those effect. This heading can be visually hidden offscreen.
Breadcrumb interaction is similar to a simple list of ordered links.
TAB key moves from breadcrumb to breadcrumb.
Separator symbols must not be keyboard focusable.
The last breadcrumb lacks an
href value and therefore is omitted from the tab order.
The screen reader will recognize the breadcrumbs as a navigation landmark.
Each breadcrumb will be announced as 'link', followed by the link text.
The screen reader should ignore each separator icon.
<nav aria-labelledby="breadcrumbs_heading" class="breadcrumbs" role="navigation"><h2 class="clipped" id="breadcrumbs_heading">You are here</h2><ol><li><a href="http://www.ebay.com">Home</a><svg focusable="false" height="10" width="10"><use xlink:href="#icon-breadcrumb"></use></svg></li><li><a href="http://www.ebay.com">Clothing, Shoes & Accessories</a><svg focusable="false" height="10" width="10"><use xlink:href="#icon-breadcrumb"></use></svg></li><li><a href="http://www.ebay.com">Men's Shoes</a><svg focusable="false" height="10" width="10"><use xlink:href="#icon-breadcrumb"></use></svg></li><li><a aria-current="location">Boots</a></li></ol></nav>
The heading ('You are here') is typically hidden offscreen using the .clipped class.
While, the separator icon can be generated with CSS, we find that inline SVG offers a more accessible and flexible approach.
aria-current="location": provides AT with programmatic state on the breadcrumb that reflects the current site location.
role=navigation: creates a navigational landmark for AT.