Skip to content
easeweb
Search topics

Infinite scroll that moves the footer away as Tab nears it

A shop's list of mugs adds twelve more ahead of the footer whenever its end comes into view, with its loading line in a plain div, so Tab meets new mugs each time it nears the footer and a screen reader is never told that more arrived.

WCAG 2.2
SC 2.1.1ASC 2.4.3ASC 4.1.3AA· new in 2.1
Required by
Section 508 · EN 301 549 (EU)
Broken observer.observe(sentinel);
The accessibility problem illustrated: Motor:How do I get to Contact us?
01

The problem

Keyboard users can't reach the links under a list that loads more as it scrolls, or lose their place each time it loads, and screen reader users are never told that more items arrived.

02

Try it

Reach Contact us, under the list of mugs, using only the keyboard.

  • Broken 1: press Tab through the mugs. Each time focus nears the end, twelve more arrive ahead of the footer, and the panel shows a screen reader hearing nothing.

  • Broken 2: the same list, rebuilt each time it loads. Focus drops off the mug it was on, and the next Tab starts again from the first mug.

  • Apply the fix. With the button, Tab past it to Contact us, or press it to load more; in the feed, press Ctrl + End from any mug.

Broken Can you fix this?

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Load more when people ask for it, add the new items without rebuilding the list, and say how many are shown in a status line.

  1. 1Let the keyboard reach what comes after the list: load more with a button after it, or give a feed a key that skips past it.
  2. 2Add new items after the ones already shown; never rebuild the list under focus.
  3. 3Put the loading message and the new count in a status line that is on the page from the start.
Before

Mugs that load as the page scrolls

<main>  <h1>Mugs</h1>  <ul class="products" data-total="48">    <li>      <a href="/mugs/enamel-white">        <img src="/images/enamel-white.jpg" alt="">        Enamel mug, white      </a>    </li>    …  </ul>  <div class="loading" hidden>Loading more mugs…</div>  <div class="sentinel"></div></main><footer>  <a href="/contact">Contact us</a>  <a href="/returns">Returns</a></footer>
After

A Load more button and a status line

<main>  <h1>Mugs</h1>  <ul class="products" data-total="48">    <li>      <a href="/mugs/enamel-white">        <img src="/images/enamel-white.jpg" alt="">        Enamel mug, white      </a>    </li>    …  </ul>  <p class="count" role="status">Showing 12 of 48 mugs</p>  <button type="button" class="load-more">Show 12 more</button></main><footer>  <a href="/contact">Contact us</a>  <a href="/returns">Returns</a></footer>

04

Design ideas

The end of a list has more than one look.

Three more ways to end the guide’s list of mugs that keep the footer within reach, and two fashionable ones that don’t. Tab through each, and press its buttons.

In the design file

  • Draw what comes after the last row, before the footer, as a button or page links, never as more rows that arrive by themselves.
  • Write how many are shown in words beside the button, such as “Showing 24 of 48”, and mark it as the line that is read out when it changes.
  • Draw the button while more load, still in its place with its label and its focus ring.
  • Mark the first new item as the place focus goes once more have loaded.

Passes

  • Faded next row with a button over it The next row shows through a white wash, with an outlined pill on top, so the eye sees there is more. Nothing comes until the pill is pressed, so the footer stays one Tab past it. The faded mugs are a picture, not links.
  • 24 of 48 mugs

    Progress line over an outlined pill “24 of 48” in words over a thin bar, and an outlined pill under them. The words are the status line, read out when they change; the bar only repeats them, so it can stay as quiet as the design wants.
  • Compact page switcher Previous and Next around “Page 2 of 4”, in one rounded bar. Each page is a page of its own, so nothing loads under the person, the footer never moves, and a page can be bookmarked. The arrows need their names in words.

Fails

  • Contact us · Returns

    Placeholder cards that load by themselvesWCAG 2.1.1 Tab to the last mug: grey placeholder cards appear under it by themselves and turn into mugs. It looks smooth, but every time Tab nears the end, a new row arrives ahead of the footer. Keep the placeholders, and show them after a press of the button.
  • Pill that turns into a spinnerWCAG 2.4.3 Press it: while more load, the pill is swapped for a spinner, so the button that had focus is gone and focus goes with it. When the pill comes back, focus is on no control. Keep the button where it is, and put the spinner inside it.
05

Verify the fix

5 checks, no mouse.

Test with: Keyboard, Screen reader

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 list, its component or its library changes.

How screen readers handle role="status", role="feed", aria-posinset, aria-setsize and aria-busy="true"

Limits

This is a starting pattern, not a guarantee for every list. The scripts are minimal sketches: they don't handle errors, filters, sorting or the browser's Back button. A list drawn by a virtualising library that removes rows as they scroll out of view needs its own checks. Product cards with more than one control each, such as a link and an Add to basket button, at least double the presses to get past the list, which makes a Load more button matter more. A scrolling panel inside the page that loads more as it scrolls is reached as described in scrollable areas that a keyboard can't scroll. Test the complete journey with the assistive technology your visitors use.

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