From f406e7355b503fc148673af193406327707ab31b Mon Sep 17 00:00:00 2001 From: wukko Date: Sat, 7 Sep 2024 20:58:30 +0600 Subject: [PATCH] web/layout: get rid of svelte announcer it reads over our own a11y labels, and there's no official way to disable it --- web/src/routes/+layout.svelte | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/src/routes/+layout.svelte b/web/src/routes/+layout.svelte index 682aef42..a69c97b4 100644 --- a/web/src/routes/+layout.svelte +++ b/web/src/routes/+layout.svelte @@ -3,6 +3,8 @@ import "@fontsource/ibm-plex-mono/400-italic.css"; import "@fontsource/ibm-plex-mono/500.css"; + import { beforeUpdate } from "svelte"; + import { page } from "$app/stores"; import { updated } from "$app/stores"; import { browser } from "$app/environment"; @@ -33,6 +35,10 @@ document.querySelector("[data-first-focus]"); to_focus?.focus(); }); + + beforeUpdate(() => { + document.getElementById("svelte-announcer")?.remove(); + })