From dffc8dc208f08fb365f49cdc12dcf7987e929401 Mon Sep 17 00:00:00 2001 From: Ridwan Sanusi Date: Fri, 12 Jun 2026 11:43:21 -0400 Subject: [PATCH] [a11y] Replace role="log" on Toaster with per-toast role="status"/"alert" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove role="log" from the Toaster container; live-region semantics move entirely to individual Toast instances - Add getRole() to Toast: error variant → role="alert" (assertive); all others → role="status" (polite) - Add aria-atomic="true" so the full toast content re-announces on each insertion, even when consecutive toasts share similar markup Screen readers can now distinguish urgency between error and informational toasts (WCAG 2.2 SC 4.1.3 Status Messages). A11y-Audit-Ref: 4.1.3-toaster-role-status-alert Co-Authored-By: Claude Sonnet 4.6 --- src/lib/holocene/toast.svelte | 10 +++++++++- src/lib/holocene/toaster.svelte | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/lib/holocene/toast.svelte b/src/lib/holocene/toast.svelte index 1bdf6d5003..1875280df5 100644 --- a/src/lib/holocene/toast.svelte +++ b/src/lib/holocene/toast.svelte @@ -1,4 +1,5 @@ -
+
{#each $toasts as { message, variant, id, link } (id)} {#if link}