Component
Fuse Alert Dialog
Variants
The same markup drops into a normal page as a flat CSS bomb and burning wick (no WebGL needed). It re-themes with the colour tokens. Sizes and states below.
Usage
Paste the markup, include assets/css/tokens.css and assets/css/tailwind.css, then run the script from this page. Hook your delete call to fad:result when detail.result === "confirmed".
Accessibility
- Role and state. A real
role="alertdialog"witharia-modal, labelled by its heading and described by its warning text. The trigger carriesaria-haspopupandaria-expanded. Focus lands on the safe action, Keep project. The burning fuse and countdown are decorative and hidden from assistive tech; a polite live region announces the outcome. - Keyboard. Enter or Space opens it, Tab cycles inside the dialog, Esc or Keep project cancels (stamping the fuse out), Delete project confirms, and focus returns to the trigger when it closes. Clicking outside does not dismiss an alert dialog.
- Reduced motion. With prefers-reduced-motion the fuse is drawn half burnt and static, there is no countdown, no auto-cancel, no sparks, shake or shockwave; the dialog appears at once and the outcome is still announced.
- Touch and pointer. Both buttons are at least 44 px tall with a visible focus ring. Tapping the bomb in the 3D scene opens the dialog too.