Modal dialog (closed by default)

This example uses the native <dialog> element. It supports keyboard focus management and closes with Escape (when shown as a modal). Focus is returned to the trigger button when the dialog closes.