About Modal Dialogs without JavaScript

HTML5 now has an API for controlling modal dialogs without JavaScript:

<button commandfor="mydialog" command="show-modal">
    Show modal dialog
</button>

<dialog id="mydialog">
    <header>
        <h2>Creative Momentum</h2>
        <button commandfor="mydialog" command="close"
            aria-label="Close dialog"></button>
    </header>
    <main>
        <p>You already know more than enough to begin.</p>
    </main>
</dialog>

Tips and Tricks Development Frontend HTML5