Variants
Same markup in three states: a ready printer with a plan picked, another plan, and a disabled printer.
Usage
Paste the markup, include assets/css/tokens.css and assets/css/tailwind.css, then run the script from this page.
Accessibility
- Role and state. Plans are a real radiogroup (role="radio", aria-checked, roving tabindex). Printing, jam and billed messages are announced through a role="status" line and a polite live region.
- Keyboard. Arrow keys move between plans, Enter or Space prints, then focus lands on Tear off. A jammed print returns focus to Print receipt so you can try another plan.
- Pointer and touch. Buttons are 40px tall or more. The printer is decoration, clicking it only makes it hum, so nothing depends on pointing at the scene.
- Reduced motion. The receipt appears fully printed, no shake, scraps or stuttered feed. Messages, totals and the PAID stamp are unchanged, and the 3D scene still renders a still frame.