fix(documents): give the undated count chip a self-describing a11y name
Some checks failed
CI / Unit & Component Tests (pull_request) Successful in 3m42s
CI / OCR Service Tests (pull_request) Successful in 25s
CI / Backend Unit Tests (pull_request) Failing after 3m46s
CI / fail2ban Regex (pull_request) Successful in 44s
CI / Semgrep Security Scan (pull_request) Successful in 21s
CI / Compose Bucket Idempotency (pull_request) Successful in 1m3s

A screen reader announced the bare number ("Nur undatierte 42"). Add an
aria-label ("42 undatierte Dokumente") via a new i18n key and hide the
purely-visual digit with aria-hidden, so the toggle + count read sensibly.

Refs #668

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-05-27 19:54:48 +02:00
parent 995471082e
commit 45e63307bb
4 changed files with 9 additions and 1 deletions

View File

@@ -101,6 +101,7 @@
"docs_list_unknown": "Unbekannt",
"docs_group_undated": "Undatiert",
"docs_filter_undated_only": "Nur undatierte",
"docs_filter_undated_count_label": "{count} undatierte Dokumente",
"docs_range_excludes_undated": "Ein Datumsfilter schließt undatierte Dokumente aus, da sie keinem Zeitraum zugeordnet werden können.",
"docs_group_unknown": "Unbekannt",
"doc_section_who_when": "Wer & Wann",

View File

@@ -101,6 +101,7 @@
"docs_list_unknown": "Unknown",
"docs_group_undated": "Undated",
"docs_filter_undated_only": "Undated only",
"docs_filter_undated_count_label": "{count} undated documents",
"docs_range_excludes_undated": "A date range filter excludes undated documents, because they cannot belong to any time span.",
"docs_group_unknown": "Unknown",
"doc_section_who_when": "Who & When",

View File

@@ -101,6 +101,7 @@
"docs_list_unknown": "Desconocido",
"docs_group_undated": "Sin fecha",
"docs_filter_undated_only": "Solo sin fecha",
"docs_filter_undated_count_label": "{count} documentos sin fecha",
"docs_range_excludes_undated": "Un filtro de intervalo de fechas excluye los documentos sin fecha, ya que no pueden pertenecer a ningún periodo.",
"docs_group_unknown": "Desconocido",
"doc_section_who_when": "Quién & Cuándo",

View File

@@ -281,12 +281,17 @@ $effect(() => {
pages (not the page slice). Stays visible regardless of the toggle
state so it advertises the triage backlog size (issue #668). -->
{#if undatedCount > 0}
<!-- The bare number "42" reads as meaningless next to the toggle label
(a screen reader would announce "Nur undatierte 42"). The chip carries
a self-describing accessible name ("42 undatierte Dokumente") and its
purely-visual digit is hidden from assistive tech (issue #668, Leonie). -->
<span
data-testid="undated-count"
aria-label={m.docs_filter_undated_count_label({ count: undatedCount })}
class="inline-flex min-w-[1.5rem] items-center justify-center rounded-full px-1.5 py-0.5 text-[0.65rem] leading-none tabular-nums {undated
? 'bg-primary-fg/20 text-primary-fg'
: 'bg-line text-ink-2'}"
>{undatedCount}</span
><span aria-hidden="true">{undatedCount}</span></span
>
{/if}
</button>