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 by a class and are bare numbers and arrows, so a screen reader can't tell which page you are on or where they go.

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

Say which page is current and where each link goes

Before
BrokenPage 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>
What is wrong3 points
  • A screen reader reads "2, link" like its neighbours, so nothing says it is the current page. The current class gives the 2 its look and nothing else.
  • The page links can't be reached from the screen reader's landmarks list. The div around them groups nothing, so the row is not announced as navigation.
  • The arrows don't say where they go. They are read as "‹, link" and "›, link", or not at all, depending on the punctuation setting.
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>
How it is fixed5 steps
  1. Make the row a nav with its own name, with the links in a list, so a screen reader announces "Pagination, navigation" on the way in and lists it among its landmarks.
  2. Put aria-current="page" on the 2, so screen readers say "current page" there.
  3. Select the dark square on the attribute instead of the class, so the look and the code can't mark different links.
  4. Name the links with hidden text: "Page 2", "Previous page" and "Next page".
  5. Hide the arrows with aria-hidden, so their symbols are not read on top of the names.

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

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.

How screen readers handle aria-current="page"

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; see infinite scroll that moves the footer away as Tab nears it. 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.

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