<dialog> is the native element for modals and dialogs. It handles focus trapping, the backdrop, the top layer, and Escape-to-close — features you'd otherwise hand-build with a lot of JavaScript and ARIA.
html
Confirm
Are you sure?
Cancel
OK
