Breadcrumbs
The small "Home › Camping › Tents" trail above a page title. Learn location-based vs path-based breadcrumbs, the right markup, collapsing on small screens, and the stale-path, 404 and screen reader bugs testers find in them.
You search an outdoor shop for “lantern” and open the Storm Lantern. Above the title it says Home › Camping › Tents. A lantern, filed under tents? You tap Camping to look around and get a “Page not found”. Two clicks, two bugs, and you haven’t even looked at the product yet.
Breadcrumbs are one line of small text, so nobody tests them on purpose. But every level is a link that must work, the trail is a promise about the site’s structure, and on a phone the whole thing has to fit in about 330 pixels.
What is it?
A breadcrumb is a row of links that shows where the current page sits in the site’s hierarchy: Home › Camping › Tents › Trailhead 2P Tent. Each level is a link to a parent page, and the last item is the page you’re on. It answers two questions at a glance: Where am I? and How do I get one level up?
The name comes from Hansel and Gretel, who dropped breadcrumbs to find their way home. You’ll find breadcrumbs on web shops, documentation sites, help centers, government sites and admin tools: anywhere with a deep hierarchy of pages.
Anatomy
shop.example.com/c/camping/tents/trailhead-2p
Trailhead 2P
A location-based breadcrumb on a product page
- 1
Landmark
A <nav> labelled "Breadcrumb", so screen reader users can jump to it and know what it is.
- 2
Root (Home)
The first level. Usually "Home" or the site name, linking to the start page.
- 3
Ancestor links
One link per level above the current page, in order. Each must open a page that exists.
- 4
Separator
A › or / between levels. Pure decoration: drawn with CSS or hidden from screen readers.
- 5
Current page
The last item. Plain text (not a link) with aria-current="page". Can be shortened if very long.
- 6
Ordered list
The levels sit in an <ol>, so screen readers say "list, 4 items" and users know how deep they are.
Location-based or path-based?
There are two very different ideas behind the same-looking trail:
| Type | Shows | Example |
|---|---|---|
| Location-based | Where the page lives in the site’s hierarchy. Always the same for a page. | Home › Lighting › Lanterns › Storm Lantern |
| Path-based (history) | The pages the user visited to get here. Different every time. | Home › Search “lantern” › Storm Lantern |
Location-based is what people almost always mean by “breadcrumbs” and what you should expect. Path-based trails just repeat the browser’s Back button, and they produce confusing results when users arrive from search, an email or another site. A third kind, attribute-based, shows the filters that narrowed a list (Tents › 2-person › Under $200); it often looks like a row of removable chips.
A web pattern
Breadcrumbs belong to websites (desktop and mobile web). Native iOS and Android apps don’t use them: the navigation bar shows a back button with the previous screen’s title, and Android adds the system Back gesture. If you see a breadcrumb in a native app, it’s usually a web view, or a design copied from the website. Test whether it still behaves like the app’s back navigation.
Designs & variants
Click the links in each example. The last two are the usual answers to “what do we do on a phone?”:
shop.example.com/c/camping/tents
Tents
Location-based
WebShows where the page lives in the site's hierarchy, no matter how the user got there. The most common and most useful type.
shop.example.com/p/storm-lantern
Storm Lantern
Path-based (history)
WebShows the pages the user visited. It repeats what the browser's Back button already does and changes every visit, so most guidelines advise against it.
shop.example.com/c/tents?people=2&max=200
7 tents
Attribute-based
WebShows the filters that narrowed a list. Often built like chips you can remove. Try removing a filter.
shop.example.com/p/trailhead-2p
Collapsed on small screens
Mobile webKeeps the first level and the last two, and hides the middle behind a … button. Tap it: every hidden level must still be reachable.
shop.example.com/p/trailhead-2p
Trailhead UltraLight 2-Person Tent
Back to parent
Mobile webOn narrow screens many shops show only the parent level as a ‹ link. Short and easy to tap, but it hides how deep the page is.
Trailhead 2P Tent
$189 · 2-person
Native apps: no breadcrumb
iOS / AndroidApps use the back button in the navigation bar (and the system Back gesture on Android) instead. Breadcrumbs are a web pattern.
- Separators:
›,/or>. Purely decorative, whichever the design system picks, as long as it’s consistent. - Home as an icon: a little house instead of the word “Home”. Needs an accessible name (“Home”), or a screen reader just says “link”.
- With a dropdown per level: some large shops let you open a level to jump to a sibling category (Tents ▾ → Stoves). Each dropdown is a dropdown with all its own tests.
When to use it
- The site has a hierarchy of three or more levels: category › subcategory › product, or docs section › chapter › article.
- Users often land deep in the site from search engines, ads or shared links, and need a quick way up.
- Users want to browse siblings: from one tent, go up to Tents and compare.
Good and bad uses
A deep shop or docs site
Home › Camping › Tents › Trailhead 2P Tent. Four levels, and many visitors arrive straight on the product from a search engine.
A flat site
Home › Contact. Two levels that the main menu already shows. The breadcrumb only adds noise.
Back button in a native app
The iOS navigation bar says ‹ Tents. One tap goes back, and the system handles the rest.
Breadcrumbs for steps
Cart › Shipping › Payment › Review in a checkout. Those are steps in a process, not places in a hierarchy. Use a wizard / stepper.
How good breadcrumbs behave
They match the real hierarchy and the URL
The trail should mirror how the site is actually organized, and usually the URL too: shop.example.com/c/camping/tents → Home › Camping › Tents. Every level must open a real page (200, not a 404 or a redirect loop). When the catalog changes (a category is renamed, merged or moved), the breadcrumbs must change with it. Old category names in the trail are a classic sign of a stale cache or a hard-coded trail.
A product that lives in several categories (a lantern in Lighting and in Camping › Essentials) needs a rule: usually one primary category is always shown. What must never happen is a trail that shows a category the product isn’t in.
The current page is not a link
The last item shows where you are. A link to the page you’re already on is useless at best; at worst it reloads the page, throws away what the user typed or scrolled, and adds a duplicate entry to the browser history. Expect plain text, marked with aria-current="page".
Long names and small screens
Real category names are long: “Outdoor & Camping Equipment”, “Backpacking Tents (1–2 person)”, and product names longer still. On a 360 px phone, a full trail can wrap over three lines and push the page title out of view. Good designs pick a strategy on purpose:
| Strategy | Watch out for |
|---|---|
| Wrap to several lines | Takes too much height; the trail looks like body text |
| Collapse the middle into ”…” | The ”…” must be a real button that reveals the hidden levels |
| Parent only (”‹ Tents”) | Users lose the sense of depth; check it’s the right parent |
| Horizontal scroll | Hidden levels are easy to miss; scroll position should start at the end |
Whatever the strategy, check the truncationTruncationText that gets cut off because it doesn't fit its space.Open in glossary →: a cut-off label needs the full text available somewhere (in the menu, a tooltip on desktop, or the page title).
Filters and sorting
Breadcrumbs point to category pages, not to the exact list the user saw. That’s normal, but many shops promise more: “the category level takes you back to the list as you left it”. If the ticket says so, coming from ?people=2&sort=price must keep that query parameterQuery parameterData in a URL after the ?, like ?q=mug&sort=price, often used to keep search and filter state.Open in glossary →. Ask what was agreed, and test it.
Structured data (SEO)
Web pages often describe their breadcrumb to search engines with a small block of JSON-LD (schema.org BreadcrumbList). Search engines can then show the trail in results instead of a raw URL:
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{ "@type": "ListItem", "position": 1, "name": "Camping", "item": "https://shop.example.com/c/camping" },
{ "@type": "ListItem", "position": 2, "name": "Tents", "item": "https://shop.example.com/c/camping/tents" },
{ "@type": "ListItem", "position": 3, "name": "Trailhead 2P Tent" }
]
}
As a tester, check that it matches the visible trail (same levels, same order, working URLs) and that Google’s Rich Results Test reports no errors. A copied template that says “Shoes › Sneakers” on every page of an outdoor shop is a real bug.
Common bugs
| # | Bug | What you see | Typical severity |
|---|---|---|---|
| 1 | Wrong category (stale path) | A product appears under the category the user browsed last, not its own | Medium |
| 2 | A level is a 404 | Clicking a level opens “Page not found” | Medium–High |
| 3 | Current page is a link | Clicking it reloads the page and adds a history entry | Low |
| 4 | Separators read aloud | Screen reader says “slash” between levels | Low–Medium |
| 5 | Unreachable levels on phones | ”…” is not clickable, middle levels can’t be reached | Medium |
| 6 | Trail doesn’t match the URL or menu | Old category names, wrong order, missing level | Low–Medium |
| 7 | Filters lost | Category level drops the filters the ticket says it keeps | Low–Medium |
| 8 | Layout breaks | Long names overflow the screen or overlap the title | Medium |
| 9 | Structured data mismatch | Search results show a different trail than the page | Low |
Stress-test it
A correct breadcrumb. Switch between Desktop and Phone, Short and Long names, and the four small-screen strategies. Then switch the separators to Text ”/” and watch the screen reader panel. Click a level to go up the hierarchy.
shop.example.com/p/trailhead-2p
Trailhead UltraLight 2-Person Backpacking Tent with Footprint
Click a level to go up the hierarchy
Collapse: first level + “…” + the last two. Tap “…” to reach the hidden levels.
Screen reader reads
- Breadcrumb, navigation
- list, 4 items
- Home, link
- Show 2 more levels, button, collapsed
- Backpacking Tents (1–2 person), link
- Trailhead UltraLight 2-Person Backpacking Tent with Footprint, current page
- end of list
Find the bug
The TrailBase outdoor shop has six breadcrumb bugs. The acceptance criteria are in the panel below the shop. Explore like a tester:
- Open Camping › Tents, filter by Sleeps 2 and sort by price, open a tent, then click each level of the trail.
- Browse Tents first, then search for “lantern” (or use Popular right now on the home page) and open a lantern.
- Click the last item of the trail. Then press the browser’s Back.
- Switch to Phone width on a product page.
- Press Read the breadcrumb and listen.
🐞 Bug hunt: TrailBase outdoor shop
This demo has 6 hidden bugs. Explore it like a tester, then check your findings.
shop.example.com
Gear up for the weekend
Shop by category
Popular right now
Device
Acceptance criteria (from the ticket)
- The breadcrumb shows where the page really lives in the catalog.
- Every level opens a working page. The current page is plain text, not a link.
- From a filtered list, the category level on the product page returns to that list with its filters and sort.
- On phones, hidden middle levels stay reachable.
- Screen readers hear “Breadcrumb”, the levels and “current page”, nothing else.
Network
- Page requests appear here…
- 1
Hint: Open the Tents list, then search for "lantern" and open the Storm Lantern.
- 2
Hint: On a product or the Tents list, click the second level of the trail. Watch the Network log.
- 3
Hint: Click the last item of the trail, then press the browser Back button.
- 4
Hint: Open a product and press "Read the breadcrumb".
- 5
Hint: Open a product, switch to Phone width and try to get to Camping from the trail.
- 6
Hint: On Tents, choose Sleeps 2 and sort by price. Open a tent, then click Tents in the trail.
How to test it
Checklist
Breadcrumb test checklist
0 of 12 checked
Example test cases
TC-BC-001Trail matches the product's real categorypositivehigh
Preconditions
- "Storm Lantern" is in Lighting › Lanterns
Steps
- Open the product from the Lanterns list
- Open it again from search results
- Open it again from a direct link in a new private window
Expected result
All three times the breadcrumb reads Home › Lighting › Lanterns › Storm Lantern.
TC-BC-002Every level opens a working pagepositivehigh
Steps
- Open a product four levels deep
- Click each breadcrumb level in turn (use Back between clicks)
Expected result
Each level opens its category page with HTTP 200, and the page title matches the breadcrumb label.
TC-BC-003Current page is not a linknegativelow
Steps
- Open a product page
- Hover and click the last breadcrumb item
- Inspect it in DevTools
Expected result
It is plain text with aria-current="page". Nothing happens on click, no new request, no new history entry.
TC-BC-004Collapsed trail on a phoneedgemedium
Preconditions
- Viewport 360 × 800
- Category names longer than 25 characters
Steps
- Open a product five levels deep
- Tap the "…" item
- Tap a hidden level
Expected result
The trail fits without horizontal page scroll, "…" opens a list of the hidden levels, and the chosen level opens.
TC-BC-005Screen reader announcementpositivemedium
Steps
- Turn on VoiceOver or NVDA
- Jump to the Breadcrumb landmark
- Read through the trail
Expected result
Announced as "Breadcrumb, navigation", a list with N items, each level as a link, the last one as "current page". No "slash" or "greater than".
TC-BC-006Renamed categoryedgemedium
Preconditions
- Admin renames "Lighting" to "Lights & Lanterns"
Steps
- Open a lantern product page (after cache expiry, if any)
Expected result
The breadcrumb, the category page title, the menu and the structured data all show "Lights & Lanterns".
Tip: click a test case to expand it.
Tools
- DevTools › Elements (see DevTools for testers): check
<nav aria-label="Breadcrumb">, the<ol>,aria-current="page"and that separators are CSS oraria-hidden. - DevTools › Network or a link checker: click every level and confirm a 200 HTTP status codeHTTP status codeA three-digit number in every server response: 200 means OK, 404 not found, 500 server error.Open in glossary →, not 404 or 301 → 301 → 301.
- Device toolbar (responsive mode) at 360 px with the longest category names you can find. See responsive design testing.
- Google Rich Results Test or the Schema Markup Validator for the
BreadcrumbListJSON-LD. - A screen reader: VoiceOver on Mac (Cmd+F5), NVDA on Windows, TalkBack in Chrome on Android.
Accessibility
- Landmark and label. Wrap the trail in
<nav aria-label="Breadcrumb">so screen readerScreen readerSoftware that reads the screen aloud for blind and low-vision users, like VoiceOver or TalkBack.Open in glossary → users can jump to it, and so it’s not confused with the main menu (anothernav). This is the ARIAARIAHTML attributes that tell assistive technology what custom elements are and what state they're in.Open in glossary → breadcrumb pattern. - An ordered list. Put the levels in an
<ol>. Screen readers then announce “list, 4 items”, which tells users how deep they are. - Current page. Plain text with
aria-current="page", read as “current page”. Make it visually different too (bold, not a link color), not by color alone. - Separators are decoration. Screen reader users shouldn’t hear “slash” or “greater than” between every level.
Dev note
Use CSS (::beforecontent, a background image) oraria-hidden="true". - Icon-only Home needs an accessible name. Collapsed levels need a real button with a name like “Show 2 more levels” and
aria-expanded. - KeyboardKeyboard navigationUsing a website with only the keyboard: Tab to move, Enter or Space to activate, Esc to close.Open in glossary →. Every link reachable with Tab, visible focus, Esc closes the ”…” menu and returns focus to its button.
- Touch targetsTouch targetThe area of the screen that responds to a tap, which should be large enough for a finger.Open in glossary →. At least 44×44 pt on iOS and 48×48 dp on Android. On the web, WCAG 2.5.8 (AA) asks for at least 24×24 CSS px; 44×44 px (2.5.5, AAA) is the comfortable target. Breadcrumb links are often 12 px text crammed together, so check the spacing between them on phones.
- Contrast. Links and the current page text need 4.5:1 for normal text; the separators are decorative, but keep them visible.
Mobile vs web
- No breadcrumb component. Hierarchy is shown by the navigation stack: the back button in the navigation bar carries the previous screen’s title (”‹ Tents”). Long-pressing it shows the whole stack.
- Test that the back title is right after arriving via a deep linkDeep linkA link that opens a specific screen inside an app instead of just its home screen.Open in glossary → or a push notification: does it go back to a sensible parent, or close the app?
- A breadcrumb inside the app is usually a web view: test it with the web checks and make sure its links don’t open a second copy of the app in a browser.
- No breadcrumb component either. Use the top app bar Up arrow and the system Back gesture/button.
- Up (in the app bar) should go to the logical parent screen; Back goes to the previous screen. After a deep link they can differ, so test both.
- Large-screen apps (tablets, Chromebooks) sometimes show a breadcrumb-like path in file managers. Test long folder names and rotation.
- This is breadcrumbs’ home. Test desktop and mobile web: at 360 px, does the trail wrap, collapse, scroll or overflow?
- Check the URL, the main menu and the trail agree, and that every level returns 200.
- Arrive at deep pages from search, emails and external links in a fresh session: the trail must not depend on what you browsed before.
- Check the structured data and the page
<title>use the same names as the trail.
Check your understanding
Quick quiz
0/5 answered · 0 correct
1.A user browses Tents, then searches for "lantern" and opens a lantern. The breadcrumb says Home › Camping › Tents › Storm Lantern. What is the bug?
2.How should the last item of a breadcrumb (the current page) be built?
3.A screen reader reads "Home, link, slash, Camping, link, slash, Tents". What should the fix be?
4.On a 360 px phone, the trail is collapsed to Home › … › Tents › Trailhead 2P. What must you test?
5.Which app should show a back button in the navigation bar instead of a breadcrumb?
Key takeaways
- Breadcrumbs show where a page lives in a hierarchy: Home › Category › Subcategory › Page. They’re a web pattern; native apps use a back button.
- Expect location-based trails: the same for a page however the user arrived. Trails built from history put products in the wrong category.
- Every level must work (no 404s) and the current page is plain text with
aria-current="page". - On phones, choose a strategy (wrap, collapse, parent only, scroll), and make sure hidden levels stay reachable.
- Markup:
<nav aria-label="Breadcrumb">, an<ol>, and separators hidden from screen readers. - Check the trail matches the URL, menu and structured data, and ask whether category links should keep filters.
Finished this page?Nice work, this page is complete!
Mark it as done to track your progress. It's saved in this browser, no account needed.
Its review cards are now in Bites ⚡