From 7ad5e35fd6a3e608a03dab70e9a4b67aaa41b5fa Mon Sep 17 00:00:00 2001 From: Marcel Date: Fri, 24 Apr 2026 21:25:06 +0200 Subject: [PATCH] fix(bulk-upload): populate aria-live region with active file title The sr-only aria-live div was always empty, so screen readers never announced file switches. Derived activeAnnouncement from the active entry and bound it to the div's text content. Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/lib/components/document/FileSwitcherStrip.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/components/document/FileSwitcherStrip.svelte b/frontend/src/lib/components/document/FileSwitcherStrip.svelte index 67a17ac2..ab1d7b7d 100644 --- a/frontend/src/lib/components/document/FileSwitcherStrip.svelte +++ b/frontend/src/lib/components/document/FileSwitcherStrip.svelte @@ -24,6 +24,8 @@ let { let trackEl = $state(null); let listEl = $state(null); +const activeAnnouncement = $derived(files.find((f) => f.id === activeId)?.title ?? ''); + function scrollPrev() { trackEl?.scrollBy({ left: -120, behavior: 'smooth' }); } @@ -58,7 +60,7 @@ $effect(() => { }); -
+
{activeAnnouncement}