fx-dialog is deprecated — use the native HTML
<dialog> element instead, as shown below. It already provides a focus
trap, aria-modal, and Escape-to-close for free; fx-show/
fx-hide work against it unchanged. See also dialog.html.