Skip to content
easeweb
Search topics

Auto-updating feeds that change while people read them

A news site's Latest list fetches itself again every 60 seconds and writes over itself, with nothing to turn it off, so the story people were on is gone.

WCAG 2.2
SC 3.2.5AAA
Required by
Not required by Section 508 or EN 301 549
Broken list.innerHTML = await response.text();
The accessibility problem illustrated: No vision:Where did my story go?
01

The problem

People reading the list with a screen reader, a keyboard or a magnifier lose the story they were on every minute, and nothing lets them stop it.

02

Try it

Tab to the third story in the list, then let the next update come in.

The list updates every 60 seconds, in real time; Skip to the next update on the demo clock saves the wait. Watch where focus goes and where your story ends up, then apply each fix and try again.

Broken Can you fix this?

BrokenA list that writes over itself every minute
Demo clock: the site checks for news in 1:00

Focus: not on the page.

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Change the list only when people ask for it.

Before
BrokenA list that writes over itself every minute
<section aria-labelledby="latest-title">  <h2 id="latest-title">Latest</h2>  <ol id="stories">    <li>      <time datetime="10:40">10:40</time>      <a href="/news/storm-warning">Storm warning for the coast tonight</a>    </li>    …  </ol></section>
What is wrong4 points
  • Every 60 seconds, the whole list is replaced, whether or not anyone is reading it.
  • The focused story's link is removed with it, so focus falls back to the page.
  • When a story comes in, every story below it moves down one place.
  • Nothing turns the updates off.
After

A button that shows the new stories

<section aria-labelledby="latest-title">  <h2 id="latest-title">Latest</h2>  <button type="button" id="show-new" hidden>Show 1 new story</button>  <ol id="stories">    <li>      <time datetime="10:40">10:40</time>      <a href="/news/storm-warning">Storm warning for the coast tonight</a>    </li>    …  </ol></section>
How it is fixed4 steps
  1. Keep fetching every 60 seconds, but ask only for the stories newer than the first one on the page, and keep them aside instead of writing them into the list.
  2. Write how many there are into a button before the list, and show it. The list doesn't change, so nobody loses their place.
  3. When the button is pressed, add the new stories to the top of the list. This is the change people asked for.
  4. Move focus to the first new story, since the button they pressed is hidden again. They are now on what they asked to see.

This fixes the Before and passes 3.2.5: the main content changes only when someone presses the button. It also meets 2.2.2, since the list no longer changes by itself.

04

Design ideas

A list can keep up with the news and still wait to be asked.

Three more ways to tell people new stories are in, and two fashionable ones that change the list by themselves. Tab to a story in each and wait a few seconds, then press what the sample offers.

In the design file

  • Draw the list twice: with stories waiting, where only the control above it changes, and after it is pressed, with the new stories at the top.
  • Put the button or the switch above the list, so it comes before the stories when the page is read or tabbed through.
  • Write the count in words on the button, such as “2 new stories”, never as a dot or a number alone.
  • Mark the first new story as the place focus goes once the button is pressed.
  • If the page offers live updates, draw the switch off when the page opens.

Passes

Fails

05

Verify the fix

5 checks, no mouse.

Test with: Keyboard, Screen reader, Zoom

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 feed component or its update script changes.

Limits

This is a starting pattern, not a guarantee for every application. It covers a list that replaces itself on a timer. The other changes 3.2.5 asks people to start, such as a window that opens when a page loads or when text is typed, fail in the same way and take the same fix: let people start them. A field or select that changes the page when it is focused or changed is covered in dropdowns and fields that change the page on their own, and a link that opens a new tab in links that open a new tab without saying so. Screen readers differ in what they do when the element they were reading is removed: test with the ones your users have.

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