Cookbook / Modal

Modal

container

Modal dialog — aria() declares role/aria-modal on the host, show toggles visibility, Escape and backdrop click dismiss.

id
aihu-modal
since
0.5.0
file
aihu-modal.aihu
propariaactionshowsloton:clickon:keydown

Run it

source · static

This recipe doesn't have a hydrated island in the demo gallery yet. An in-browser, WASM-compiled playground (edit this source and re-render live) is planned as a follow-up — read the real source below.

Source

aihu-modal.aihu

Requires

concerns
a11yeventsstate

Anti-patterns

  • Do not scatter role/aria-modal on inner wrappers — aria() declares them once on the host element.

Related recipes