Skip to content
Bugwise
Menu
UI Components

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.

35 min Navigation Web Also called: Breadcrumb trail, Path navigation

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

A location-based breadcrumb on a product page

  1. 1

    Landmark

    A <nav> labelled "Breadcrumb", so screen reader users can jump to it and know what it is.

  2. 2

    Root (Home)

    The first level. Usually "Home" or the site name, linking to the start page.

  3. 3

    Ancestor links

    One link per level above the current page, in order. Each must open a page that exists.

  4. 4

    Separator

    A › or / between levels. Pure decoration: drawn with CSS or hidden from screen readers.

  5. 5

    Current page

    The last item. Plain text (not a link) with aria-current="page". Can be shortened if very long.

  6. 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:

TypeShowsExample
Location-basedWhere 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

Web

Shows where the page lives in the site's hierarchy, no matter how the user got there. The most common and most useful type.

Default choiceMatches the URL

shop.example.com/p/storm-lantern

Storm Lantern

Path-based (history)

Web

Shows 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.

RareUnstable

shop.example.com/c/tents?people=2&max=200

7 tents

Attribute-based

Web

Shows the filters that narrowed a list. Often built like chips you can remove. Try removing a filter.

ShopsFilters

shop.example.com/p/trailhead-2p

Collapsed on small screens

Mobile web

Keeps the first level and the last two, and hides the middle behind a … button. Tap it: every hidden level must still be reachable.

ResponsiveMenu

shop.example.com/p/trailhead-2p

Trailhead UltraLight 2-Person Tent

Back to parent

Mobile web

On 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.

CompactOne level
Tents

Trailhead 2P Tent

$189 · 2-person

Native apps: no breadcrumb

iOS / Android

Apps use the back button in the navigation bar (and the system Back gesture on Android) instead. Breadcrumbs are a web pattern.

Navigation barBack button
  • 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 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:

StrategyWatch out for
Wrap to several linesTakes 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 scrollHidden 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

#BugWhat you seeTypical severity
1Wrong category (stale path)A product appears under the category the user browsed last, not its ownMedium
2A level is a 404Clicking a level opens “Page not found”Medium–High
3Current page is a linkClicking it reloads the page and adds a history entryLow
4Separators read aloudScreen reader says “slash” between levelsLow–Medium
5Unreachable levels on phones”…” is not clickable, middle levels can’t be reachedMedium
6Trail doesn’t match the URL or menuOld category names, wrong order, missing levelLow–Medium
7Filters lostCategory level drops the filters the ticket says it keepsLow–Medium
8Layout breaksLong names overflow the screen or overlap the titleMedium
9Structured data mismatchSearch results show a different trail than the pageLow

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.

Screen width
Category names
Small-screen strategy
Separators in the markup

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

  1. Breadcrumb, navigation
  2. list, 4 items
  3. Home, link
  4. Show 2 more levels, button, collapsed
  5. Backpacking Tents (1–2 person), link
  6. Trailhead UltraLight 2-Person Backpacking Tent with Footprint, current page
  7. 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.

Found0/6

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. 1

    Hint: Open the Tents list, then search for "lantern" and open the Storm Lantern.

  2. 2

    Hint: On a product or the Tents list, click the second level of the trail. Watch the Network log.

  3. 3

    Hint: Click the last item of the trail, then press the browser Back button.

  4. 4

    Hint: Open a product and press "Read the breadcrumb".

  5. 5

    Hint: Open a product, switch to Phone width and try to get to Camping from the trail.

  6. 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 category

Preconditions

  • "Storm Lantern" is in Lighting › Lanterns

Steps

  1. Open the product from the Lanterns list
  2. Open it again from search results
  3. 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 page

Steps

  1. Open a product four levels deep
  2. 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 link

Steps

  1. Open a product page
  2. Hover and click the last breadcrumb item
  3. 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 phone

Preconditions

  • Viewport 360 × 800
  • Category names longer than 25 characters

Steps

  1. Open a product five levels deep
  2. Tap the "…" item
  3. 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 announcement

Steps

  1. Turn on VoiceOver or NVDA
  2. Jump to the Breadcrumb landmark
  3. 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 category

Preconditions

  • Admin renames "Lighting" to "Lights & Lanterns"

Steps

  1. 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

Accessibility

Mobile vs web

  • 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. 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. 2.How should the last item of a breadcrumb (the current page) be built?

  3. 3.A screen reader reads "Home, link, slash, Camping, link, slash, Tents". What should the fix be?

  4. 4.On a 360 px phone, the trail is collapsed to Home › … › Tents › Trailhead 2P. What must you test?

  5. 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 ⚡
Esc

Type to search the whole site.