Files
breadcrumb-the-shire/templates/partials/app-toast-stack.phtml
fs 2429588256 refactor(ui): move toast stack chrome to a server-rendered partial
Mirrors the detail-drawer move: the .app-toast-stack container is no
longer lazy-created in JS on first toast, instead it lives in
templates/partials/app-toast-stack.phtml and is mounted once in
default.phtml alongside the confirm dialog. The aria-live attribute now
sits in the SSR markup so screen readers register the live region from
page load, not from the first toast.

getToastStack() drops to a plain querySelector and warns via warnOnce
when the partial is missing instead of constructing a fallback container.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 19:13:55 +02:00

13 lines
388 B
PHTML

<?php
/**
* Async toast stack — global container for JS-triggered notifications.
*
* Mounted once at the bottom of the shell so any page can fire toasts via
* showAsyncFlash() without the JS having to lazy-create the container.
* Empty by default; toasts are appended/removed by web/js/components/app-async-flash.js.
*/
?>
<div class="app-toast-stack" aria-live="polite"></div>