Skip to content
easeweb
Search topics

Breadcrumbs that mark the current page only by its look

A shop's breadcrumb trail is a row of loose links in a div, and its last crumb is grey by a class only, so a screen reader can't tell that it is a trail or which crumb is the page you are on.

WCAG 2.2
SC 1.3.1A
Required by
Section 508 · EN 301 549 (EU)
Broken <a href="/kitchen/mugs" class="current">Mugs</a>
The accessibility problem illustrated: No vision:Which page am I on?
01

The problem

Screen reader users can't tell where the breadcrumb trail starts and ends, or which crumb is the page they are on, because only the layout and a grey colour show it.

02

Try it

Press Tab to move through the trail, and Enter to go to another page.

The panel reads the top of the page as a screen reader does. Can you tell which crumb is the page you are on? Go deeper through the links under the heading, and back up through the trail.

Broken Can you fix this?

BrokenA trail of loose links, the last one marked by a class

Reading from the top, a screen reader says:

  1. Home, link
  2. slash
  3. Kitchen, link
  4. slash
  5. Mugs, link
  6. Mugs, heading

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Put the trail in a named nav, and say the current page in code, or leave it out of the trail.

  1. 1Put the breadcrumb trail in a nav with its own short name, as an ordered list.
  2. 2Mark the last crumb with aria-current="page" and draw its look from it, or end the trail at the section above.
  3. 3Draw the separators in CSS without text, or hide them, so they are never read.
Before A trail of loose links, the last one marked by a class
<div class="breadcrumbs">  <a href="/">Home</a>  <span class="sep">/</span>  <a href="/kitchen">Kitchen</a>  <span class="sep">/</span>  <a href="/kitchen/mugs" class="current">Mugs</a></div><h1>Mugs</h1>
After

A named nav, a list and aria-current

<nav class="breadcrumbs" aria-label="Breadcrumb">  <ol>    <li>      <a href="/">Home</a>    </li>    <li>      <a href="/kitchen">Kitchen</a>    </li>    <li>      <a href="/kitchen/mugs" aria-current="page">Mugs</a>    </li>  </ol></nav><h1>Mugs</h1>

Fixing this with an AI coding assistant? Get this guide as Markdown, or get every guide in your coding agent.

04

Verify the fix

5 checks, no mouse.

Test with: Screen reader, Keyboard, Forced colors

0 of 5 checked

Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat after the shared breadcrumb component changes.

Limits

This is a starting pattern, not a guarantee for every site. Screen readers word aria-current and landmarks differently, and how they read punctuation depends on their settings; test with the ones your visitors use. A trail only helps when it follows the site's real structure: one that changes with how someone arrived, or skips a level, leaves people as lost as none. The page links at the end of a long list have failures of their own; see pagination links that don't say which page or where they go. The site's main menu marks its current page with the same attribute; see navigation that marks the current page only by its look.

This is a recreated teaching example, not a finding about a named client. The code is a starting pattern: test it in your own product. No completed assistive-technology test is claimed here.

Keep this fixed as your code changes.

Turn guides like this into rules your coding agents and CI follow, then have the result retested with a keyboard and screen readers.

How retests work