Skip to content
easeweb
Search topics

Pagination links that don't say which page or where they go

A shop's page links mark the current page only with a class, and the links themselves are bare numbers and arrows, so a screen reader can't tell which page you are on or where each link goes.

WCAG 2.2
SC 1.3.1ASC 2.4.4A
Required by
Section 508 · EN 301 549 (EU)
Broken <a href="/kitchen/mugs?page=3">›</a>
The accessibility problem illustrated: No vision:Where does this link go?
01

The problem

Screen reader users can't tell which page of a list they are on, or where the arrow links go, because the page links say it only by their look.

02

Try it

Press Tab to move through the page links, and Enter to go to a page.

The panel reads the page links as a screen reader does. Can you tell which page you are on, and where each arrow goes?

Broken Can you fix this?

BrokenPage links marked by a class, with symbols for arrows

Mugs

  • Speckled mug
  • Tall mug
  • Espresso cup

Reading the page links, a screen reader says:

  1. ‹, link
  2. 1, link
  3. 2, link
  4. 3, link
  5. 4, link
  6. ›, link

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Put the page links in a named nav, say the current page in code or text, and name every link in words.

  1. 1Put the page links in a nav with its own short name.
  2. 2Mark the current page with aria-current="page", or state it in text, and draw the look from the same condition.
  3. 3Give every page link a name in words, such as "Page 2" or "Next page", whatever it shows.
Before Page links marked by a class, with symbols for arrows
<h1>Mugs</h1>…<div class="pagination">  <a href="/kitchen/mugs?page=1">‹</a>  <a href="/kitchen/mugs?page=1">1</a>  <a href="/kitchen/mugs?page=2" class="current">2</a>  <a href="/kitchen/mugs?page=3">3</a>  <a href="/kitchen/mugs?page=4">4</a>  <a href="/kitchen/mugs?page=3">›</a></div>
After

A named nav, aria-current and hidden names

<h1>Mugs</h1>…<nav class="pagination" aria-label="Pagination">  <ul>    <li>      <a href="/kitchen/mugs?page=1">        <span aria-hidden="true">‹</span>        <span class="visually-hidden">Previous page</span>      </a>    </li>    <li>      <a href="/kitchen/mugs?page=1">        <span class="visually-hidden">Page </span>1      </a>    </li>    <li>      <a href="/kitchen/mugs?page=2" aria-current="page">        <span class="visually-hidden">Page </span>2      </a>    </li>    <li>      <a href="/kitchen/mugs?page=3">        <span class="visually-hidden">Page </span>3      </a>    </li>    <li>      <a href="/kitchen/mugs?page=4">        <span class="visually-hidden">Page </span>4      </a>    </li>    <li>      <a href="/kitchen/mugs?page=3">        <span aria-hidden="true">›</span>        <span class="visually-hidden">Next page</span>      </a>    </li>  </ul></nav>

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

04

Design ideas

Page links can be drawn in more than one look.

Three more ways to draw them. Point at the links, Tab through them, and click a page to move the mark there. Two pass; one draws the pages as dots, so no link has a word to be read or said.

In the design file

  • Write the name of every page link beside it, such as Page 2, Previous page and Next page, even where only a number or an arrow shows.
  • Draw the page you are on as its own state, marked by more than a fill, such as bold type or a line, because a Windows contrast theme drops fills.
  • Draw the first and the last page too, where one of the arrows has nowhere to go.

Passes

  • Bold number on a bar, words at the ends The 2 is bold #1d1d1f with a 3px bar under it, 16.83:1 on white, and both the weight and the bar stay in a contrast theme. Previous and Next are written out, so voice control users can say them, and the code adds the word page to the names of the numbers and of Previous and Next. On the first and last page, the arrow with nowhere to go is faded and is not a link.
  • Round arrows around a page count Two round 40px arrows hold “2 / 4” in bold between them, so the page you are on is written, not drawn. Nothing on screen spells out the arrows, so write their names, Previous page and Next page, in the design file.

Fails

  • Dots for pagesWCAG 2.4.4 Four 10px dots, #8796a5 at 3.03:1 and the current one filled #1d1d1f. A dot has no words, so a screen reader says only “link”, or part of its address, for each, voice control users have nothing to say, and the filled dot is the only sign of the page you are on.
05

Verify the fix

5 checks, no mouse.

Test with: Screen reader, Keyboard, Speech input

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 pagination component changes.

Limits

This is a starting pattern, not a guarantee for every list. Screen readers word aria-current and landmarks differently, and how they read symbols depends on the punctuation setting; test with the ones your visitors use. Lists that load more on scroll or with a Load more button need their own care, because they have no pages to mark. The breadcrumb trail at the top of the same page has a failure of its own; see breadcrumbs that mark the current page only by its look. 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