Skip to content
easeweb
Search topics

Breadcrumbs that mark the current page only by its look

A shop's breadcrumb trail is loose links in a div, its last crumb grey by a class, so a screen reader can't tell it is a trail or which 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

Name the trail, and don't mark the current page by looks

Before
BrokenA 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>
What is wrong3 points
  • Nothing tells a screen reader that Mugs is the page you are on. The current class gives Mugs its grey look and nothing else.
  • The trail can't be found as a whole. The div groups nothing, so the trail is missing from the landmarks list and has no list to say how many crumbs there are.
  • The crumbs sound like any other links. A screen reader reads "Home, link", "Kitchen, link", "Mugs, link", with the slashes between them at some punctuation settings.
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>
How it is fixed5 steps
  1. Make the trail a nav with its own name, so a screen reader announces "Breadcrumb, navigation" on the way in and lists it among its landmarks.
  2. Put the crumbs in an ordered list, read as "list, 3 items" from the top down.
  3. Put aria-current="page" on Mugs, so screen readers say "current page" there.
  4. Select the grey on the attribute instead of the class, so the look and the code can't mark different crumbs.
  5. Draw the separator as a thin rotated line with a border, so there is no text for a screen reader to read.

This fixes the Before and passes 1.3.1. The design is unchanged: every crumb looks as it was drawn.

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.

How screen readers handle aria-current="page"

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. A deep page with no trail at all, and nothing else that says where it sits, is covered in deep pages with no breadcrumb or highlighted menu section. 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.

EaseWeb service

Fixed it? Keep it from coming back.

I turn guides like this one into rules your coding agents follow and checks your CI runs. Then I retest by hand with a keyboard and screen readers, periodically.

See the service