Component
Garage-Door Dialog
Variants
The same markup drops into a normal page as a flat CSS shutter (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. Listen for gdd:close to read the result.
Accessibility
- Role and state. The dialog is a real
role="dialog"witharia-modal, labelled and described by its heading and text. The trigger carriesaria-haspopupandaria-expanded; the booking choice is a native radio group; a polite live region reports the outcome. The shutter and the 3D bay are decorative and hidden from assistive tech. - Keyboard. Enter or Space on the trigger opens it, focus moves into the dialog and is trapped, Tab and Shift+Tab cycle, arrow keys change the pickup window, Esc or Cancel closes and focus returns to the trigger.
- Reduced motion. With prefers-reduced-motion the shutter jumps to open or closed, there is no dust, camera dolly or shockwave, and the dialog appears at once; the state is still obvious.
- Touch and pointer. Tapping the door in the 3D bay opens the dialog too. Buttons and radio chips are at least 44 px tall, and the backdrop closes the dialog on tap.