Skip to content
easeweb
Search topics

Navigation that marks the current page only by its look

The menu link for the page you are on is bold and underlined by a class, but nothing in the markup says it is the current page.

WCAG 2.2
SC 1.3.1A
Required by
Section 508 · EN 301 549 (EU)
Broken class="active"
The accessibility problem illustrated: Marked as this page, but only visually.
01

The problem

Screen reader users move through the menu without being told which page they are on.

02

Try it

Press Tab to move through the menu.

The panel shows what a screen reader says on each link. Can you tell which page you are on? Press Enter on another link to move there.

Broken Can you fix this?

Screen reader says:

(Tab to a link)

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Say in the code which menu link is the current page, and draw the look from that.

  1. 1Mark the current page's link with aria-current="page", or with hidden text inside the link.
  2. 2Set the visual style and the code marker from the same condition, so they mark the same link.
  3. 3Mark one link per menu, and move the mark when the page changes.
Before The current link marked by a class
<nav aria-label="Main">  <ul>    <li><a href="/">Home</a></li>    <li><a href="/products">Products</a></li>    <li><a href="/pricing" class="active">Pricing</a></li>    <li><a href="/contact">Contact</a></li>  </ul></nav>
After

Aria-current on the link

<nav aria-label="Main">  <ul>    <li><a href="/">Home</a></li>    <li><a href="/products">Products</a></li>    <li><a href="/pricing" aria-current="page">Pricing</a></li>    <li><a href="/contact">Contact</a></li>  </ul></nav>

Fixing this with an AI coding assistant? Get this guide as Markdown

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 menu or router changes.

Limits

This is a starting pattern, not a guarantee for every menu. Screen readers word aria-current differently, and some say it before the link name and some after. A menu that marks the right link still leaves people lost on a site with a confusing structure; a clear page title, heading and breadcrumbs carry the rest.

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