Menu

Breadcrumbs on a product page: the markup, the accessibility bits, and the structured data
📰

Breadcrumbs on a product page: the markup, the accessibility bits, and the structured data

DEV Community: html·RAMO·about 14 hours ago
#6zFeqEGo
#devto2#devto#dev#trail#article
Reading 0:00
15s threshold

Breadcrumbs are one of those components nobody argues about. Everyone adds them, they look like a row of small grey links, and they get forgotten. But on a store with deep categories they do three separate jobs, and it's easy to get one of them wrong:

They help a visitor who landed from search figure out where they are.

They help screen reader users jump up a level without hunting through the menu.

They give search engines a clear picture of how your pages are related.

Here's a version that handles all three without much code.

Start with plain HTML

<nav aria-label = "Breadcrumb" > <ol class = "breadcrumbs" > <li><a href = "/" > Home </a></li> <li><a href = "/categories/electrical" > Electrical </a></li> <li><a href = "/categories/measuring-instruments" > Measuring instruments </a></li> <li><a href = "/products/digital-multimeter" aria-current = "page" > Digital multimeter </a></li> </ol> </nav>

Enter fullscreen mode

Exit fullscreen mode

A few choices in there are deliberate:

<nav> with an…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.