Modal
Stacked dialogs with focus restore. ESC, backdrop click, and form method=dialog all dismiss. The trigger gets focus back when the top dialog closes. Press / or use Search in this header — that’s a live <Modal>.
<Modal> focus trap
view!
view! {
<Modal id="confirm" closedBy="any">
<button slot="trigger" type="button">"Delete"</button>
<h2>"Delete this job?"</h2>
<form method="dialog">
<button type="submit">"Cancel"</button>
</form>
</Modal>
}Trigger without a slot
If you omit slot="trigger", a leading <button> becomes the opener. A non-button first child stays in the dialog (open it with __resuma.showModal).
Native HTML
SSR emits <dialog closedby="any"> and a trigger with command="show-modal" / commandfor. Chrome uses Invoker Commands with no JS. Safari gets a click fallback in /_resuma/ui.js plus light-dismiss when closedby is missing.
Stack
js! { __resuma.showModal("confirm"); }
js! { __resuma.hideModal("confirm"); }
js! { __resuma.dismissAll(); }A global live region (#r-live) is in the document. After a submit, call __resuma.announce("Saved") — see Desktop UI.