[bug][search] Spotlight rough edges: "1 results", duplicated no-results message, dead Type filter, silent empty for short queries #129

Closed
opened 2026-06-22 06:27:52 +03:00 by Ghost · 0 comments

Severity: low (search-UX) — corrected after DOM verification

Correction: two of the originally-reported points turned out to be screen-reader-only / not bugs once I inspected the DOM. Keeping the issue for the two genuine visible problems and an a11y nit.

Genuine visible issues

  1. Dead "Type" filter — the content-type dropdown in the spotlight contains only "Pages"; there is nothing to switch to (attachments not selectable). It looks interactive but is a no-op control. Either add the attachment option or hide the filter.
  2. Short queries silently return empty — a 1–2 char query (e.g. a) shows "No results found..." with no hint, even though many pages contain it (Postgres FTS token-length behavior). Looks like search is broken for short terms; consider a "type at least N characters" hint.

a11y nit (not visible to sighted users)

  1. Plural for a single result — the result-count text (e.g. "1 results found") lives in a VisuallyHidden aria-live region (1×1px, clipped), i.e. it is only announced to screen readers, not shown on screen. It just lacks singular/plural handling ("1 results found"). Minor.

NOT a bug (retracted)

  • The earlier "no-results message rendered twice" is correct behaviour: DOM check shows one visible "No results found..." message plus one VisuallyHidden aria-live copy that announces the state to screen readers. That is the intended accessible pattern, not a duplicate render.

(The attached screenshots show the search count/no-results with the VisuallyHidden element temporarily un-hidden via a CSS override, to make the aria-live text legible — a sighted user does not see the count line.)

Screenshot

Issue 129: single match shows plural header '1 results found' (visually-hidden ARIA text revealed for evidence)
Issue 129: 'No results found' rendered twice (ARIA-live region + body message)

**Severity:** low (search-UX) — **corrected after DOM verification** > Correction: two of the originally-reported points turned out to be **screen-reader-only / not bugs** once I inspected the DOM. Keeping the issue for the two genuine visible problems and an a11y nit. ### Genuine visible issues 1. **Dead "Type" filter** — the content-type dropdown in the spotlight contains only **"Pages"**; there is nothing to switch to (attachments not selectable). It looks interactive but is a no-op control. Either add the attachment option or hide the filter. 2. **Short queries silently return empty** — a 1–2 char query (e.g. `a`) shows "No results found..." with no hint, even though many pages contain it (Postgres FTS token-length behavior). Looks like search is broken for short terms; consider a "type at least N characters" hint. ### a11y nit (not visible to sighted users) 3. **Plural for a single result** — the result-count text (e.g. "1 results found") lives in a `VisuallyHidden` aria-live region (1×1px, clipped), i.e. it is **only announced to screen readers**, not shown on screen. It just lacks singular/plural handling ("1 results found"). Minor. ### NOT a bug (retracted) - The earlier "no-results message rendered twice" is **correct behaviour**: DOM check shows one **visible** "No results found..." message plus one **VisuallyHidden aria-live** copy that announces the state to screen readers. That is the intended accessible pattern, not a duplicate render. _(The attached screenshots show the search count/no-results with the VisuallyHidden element temporarily un-hidden via a CSS override, to make the aria-live text legible — a sighted user does not see the count line.)_ ### Screenshot ![Issue 129: single match shows plural header '1 results found' (visually-hidden ARIA text revealed for evidence)](https://gitea.vvzvlad.xyz/attachments/0d965cdf-a644-44d7-a183-4f5e08597631) ![Issue 129: 'No results found' rendered twice (ARIA-live region + body message)](https://gitea.vvzvlad.xyz/attachments/08925bfa-9cc0-45ca-9692-588577aeecf7)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vvzvlad/gitmost#129