From 41317214bce0ac010f01ee32dc8dad880f65e78a Mon Sep 17 00:00:00 2001 From: AropJoe Date: Sat, 10 Oct 2026 00:27:12 +0100 Subject: [PATCH 1/2] Announce the number of results when a search finishes --- assets/ui/app.js | 2 ++ assets/ui/index.html | 1 + 2 files changed, 3 insertions(+) diff --git a/assets/ui/app.js b/assets/ui/app.js index 9589486..3d12905 100644 --- a/assets/ui/app.js +++ b/assets/ui/app.js @@ -732,6 +732,8 @@ function renderResults() { const docs = state.cards.length $('#resultsTitle').textContent = !results.length ? 'No results for “' + state.query + '”' : plural(docs, 'document') + (results.length > docs ? ' · ' + plural(results.length, 'passage') : '') + ' for “' + state.query + '”' + // Screen readers hear the count when a search finishes (WCAG 4.1.3). + $('#resultsStatus').textContent = $('#resultsTitle').textContent $('#results').innerHTML = state.cards.map((idx, card) => { const r = results[idx[0]] const c = r.chunk diff --git a/assets/ui/index.html b/assets/ui/index.html index 4acfaa1..4aec722 100644 --- a/assets/ui/index.html +++ b/assets/ui/index.html @@ -133,6 +133,7 @@