diff --git a/resources/views/components/toast.blade.php b/resources/views/components/toast.blade.php index f82ff6d9..fb09d3c7 100644 --- a/resources/views/components/toast.blade.php +++ b/resources/views/components/toast.blade.php @@ -15,6 +15,12 @@ the queue: a toast that arrives meanwhile shows in its place, and the sticky one comes back once the queue is empty. One is kept at a time; a newer sticky toast replaces it. + The live region is the host itself, not the snackbar: a region must be in the page before its + contents change for a screen reader to announce them reliably, and the snackbar comes and + goes. It is `aria-live="polite" aria-atomic="true"`, as M3 asks for a snackbar (never + assertive); a `type` picks the region's role — `alert` for an error or a warning, `status` + otherwise — and the explicit `aria-live` keeps even those polite. + Hooks for tests and styling: `data-toast` on the snackbar on screen, `data-toast-action` on its action button. @@ -33,6 +39,10 @@ @persist('material-toast')