Search Result Announcements
What you'll learn: How to make screen readers announce search result counts and updates as users type in real-time search interfaces.
When users perform a search on your website, screen reader users need to know immediately how many results were found—without navigating away from the search input. This is especially important in live search (autocomplete, filter-as-you-type) where results update continuously.
The Problem
Imagine typing into a search box and having no idea whether you got 0 results, 3 results, or 300 results. Sighted users see the results update visually, but screen reader users might remain in the dark unless you announce the changes properly.
The Solution: Live Regions
Use aria-live="polite" (or a status role) on a container that holds your result count message:
<label for="product-search">Search products:</label>
<input type="search" id="product-search" />
<div role="status" aria-live="polite" aria-atomic="true">
<!-- JavaScript updates this -->
<span id="result-count"></span>
</div>
<ul id="results">
<!-- Search results appear here -->
</ul>
When results change, update the status text:
// After search completes
const count = results.length;
const message = count === 0
? "No results found"
: `${count} result${count === 1 ? '' : 's'} found`;
document.getElementById('result-count').textContent = message;
Key Details
- Use
aria-atomic="true"so the entire count is re-announced, not just what changed - Keep messages concise: "15 results found" not "There are 15 results available for your search"
- Announce zero results: Users need to know when nothing matched
- Don't spam: Consider debouncing rapid updates (wait ~300ms after typing stops)
Key Takeaway: Announcing search result counts with live regions ensures screen reader users immediately understand the outcome of their search, creating an equitable real-time search experience.