Skip to content
easeweb
Search topics

Search and filter results that update without a word

A live product search rewrites its result count as people type, but the line is in no live region, so a screen reader never says it.

WCAG 2.2
SC 4.1.3AA· new in 2.1
Required by
EN 301 549 (EU)
Broken count.textContent = countText(products.length, words);
The accessibility problem illustrated: The list changed. Nobody said so.
01

The problem

Screen reader users type a search or tick a filter and can't tell whether the results changed, how many there are, or that nothing matched.

02

Try it

Search for apron, stop, and listen.

The panel shows what a screen reader announces after each search. Is the number of products ever heard? Try a word nothing matches too.

Broken Can you fix this?

Showing all 6 products

  • Linen apron
  • Canvas apron
  • Child's apron
  • Tea towels, set of 3
  • Oven gloves
  • Bread tin

Screen reader says:

(Type in the search, then stop)

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Write the count into a status region that was there before the search, after the results arrive.

  1. 1Render the status region with the page, outside the part that is rebuilt with the results.
  2. 2Announce the count once typing pauses and the results are in, including when nothing matches.
  3. 3Keep focus in the search field; never put aria-live on the results list.
Before A count line that changes on screen only
<label for="q">Search products</label><input type="search" id="q"><p id="result-count">Showing all 6 products</p><ul id="results">…</ul>
After

The visible count as a status region

<label for="q">Search products</label><input type="search" id="q"><p id="result-count" role="status">Showing all 6 products</p><ul id="results">…</ul>

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

04

Verify the fix

4 checks, no mouse.

Test with: Screen reader, Keyboard

0 of 4 checked

Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat after the search component, the results template or the page layout changes.

Limits

Live regions behave differently across screen readers and browsers, and some drop a polite message when people keep typing. This pattern covers one search field on one page. Saved-draft messages are covered in status messages that are shown but never announced; infinite scroll and Load more are a loading topic of their own. Test your real search, with its real filters, sorting and pagination, with the screen readers your users 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