From dfdcacdb852c79c804f53607617f8e37275072bb Mon Sep 17 00:00:00 2001 From: Marcel Date: Fri, 8 May 2026 09:53:18 +0200 Subject: [PATCH] feat(documents): localise timeline bar aria-label (#385) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaces the raw "1915-08 · 5" aria-label, which a screen reader announces as "1915 dash 08 middle dot 5", with the i18n template timeline_bar_aria("{when}, {count} ...") and a getLocale-formatted month/year string. Closes Leonie's WCAG 1.3.1 / 4.1.2 finding and Felix's localisation flag. Co-Authored-By: Claude Opus 4.7 --- frontend/messages/de.json | 1 + frontend/messages/en.json | 1 + frontend/messages/es.json | 1 + .../lib/document/TimelineDensityFilter.svelte | 5 ++- .../TimelineDensityFilter.svelte.spec.ts | 37 +++++++++++++++++-- 5 files changed, 40 insertions(+), 5 deletions(-) diff --git a/frontend/messages/de.json b/frontend/messages/de.json index ee79f59f..4c4caeb3 100644 --- a/frontend/messages/de.json +++ b/frontend/messages/de.json @@ -1050,5 +1050,6 @@ "timeline_aria_label": "Zeitachse Dokumentdichte", "timeline_clear_selection": "Auswahl zurücksetzen", "timeline_zoom_reset": "Zurück zur Übersicht", + "timeline_bar_aria": "{when}, {count} Dokumente", "timeline_dragging_aria_live": "Zeitraum {from} bis {to} ausgewählt" } diff --git a/frontend/messages/en.json b/frontend/messages/en.json index f0f2abfe..536ca0fb 100644 --- a/frontend/messages/en.json +++ b/frontend/messages/en.json @@ -1050,5 +1050,6 @@ "timeline_aria_label": "Document density timeline", "timeline_clear_selection": "Clear selection", "timeline_zoom_reset": "Reset zoom", + "timeline_bar_aria": "{when}, {count} documents", "timeline_dragging_aria_live": "Range {from} to {to} selected" } diff --git a/frontend/messages/es.json b/frontend/messages/es.json index 5e507972..f4677d90 100644 --- a/frontend/messages/es.json +++ b/frontend/messages/es.json @@ -1050,5 +1050,6 @@ "timeline_aria_label": "Cronología de densidad de documentos", "timeline_clear_selection": "Borrar selección", "timeline_zoom_reset": "Restablecer zoom", + "timeline_bar_aria": "{when}, {count} documentos", "timeline_dragging_aria_live": "Rango {from} a {to} seleccionado" } diff --git a/frontend/src/lib/document/TimelineDensityFilter.svelte b/frontend/src/lib/document/TimelineDensityFilter.svelte index 6b32cbd1..9a775080 100644 --- a/frontend/src/lib/document/TimelineDensityFilter.svelte +++ b/frontend/src/lib/document/TimelineDensityFilter.svelte @@ -260,7 +260,10 @@ const omitTickYear = $derived.by(() => {