web/layout: get rid of svelte announcer

it reads over our own a11y labels, and there's no official way to disable it
This commit is contained in:
wukko 2024-09-07 20:58:30 +06:00
parent 70ba8f8b39
commit f406e7355b
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -3,6 +3,8 @@
import "@fontsource/ibm-plex-mono/400-italic.css"; import "@fontsource/ibm-plex-mono/400-italic.css";
import "@fontsource/ibm-plex-mono/500.css"; import "@fontsource/ibm-plex-mono/500.css";
import { beforeUpdate } from "svelte";
import { page } from "$app/stores"; import { page } from "$app/stores";
import { updated } from "$app/stores"; import { updated } from "$app/stores";
import { browser } from "$app/environment"; import { browser } from "$app/environment";
@ -33,6 +35,10 @@
document.querySelector("[data-first-focus]"); document.querySelector("[data-first-focus]");
to_focus?.focus(); to_focus?.focus();
}); });
beforeUpdate(() => {
document.getElementById("svelte-announcer")?.remove();
})
</script> </script>
<svelte:head> <svelte:head>