Your borrowing FAQ from the exercise now opens one answer at a time where that helps. Kwame’s next complaint is about the My Reservations page, where each Cancel button cancels at once, with no second chance. Mei Lin Chen tapped one by mistake on her cell phone and lost the step ladder she’d reserved for a weekend of painting.
In this lesson, you’ll make the ladder’s Cancel button ask first, with a native <dialog> that HTML attributes open and close. You’ll name the dialog, give older browsers a fallback, and check that it holds focus while it’s open. Start by showing a dialog the way you already know, with the open attribute.
Show a Dialog With open
Canceling should take two steps, one to ask and one to confirm. Open my-reservations.html from this lesson’s starting site in your live preview. Each reservation’s button sends its form to reservation-cancelled.html the moment someone activates it.
A <dialog> holds a question that needs an answer, and its open attribute shows it. Add this one inside the ladder’s <section>, right after its </form>:
<dialog open>
<h2>Cancel the step ladder?</h2>
<p>Another member can then reserve it for December 4.</p>
<button>Keep it</button>
<button>Yes, cancel</button>
</dialog>
Save, and the dialog appears on the page:

The box sits over the hedge trimmer reservation, and nothing else changes. But does it act like a dialog? Click the ladder’s pickup line so focus starts there, then press Tab until focus reaches Yes, cancel. Predict what one more Tab does, and then what Esc does.
In this lesson’s run in Chromium on November 29, 2026, the next Tab moved focus out of the dialog to Cancel hedge trimmer, the button mostly hidden behind it. Esc did nothing, and the dialog stayed on the page.
That was a detour on purpose. The open attribute shows a non-modal dialog: a box that’s part of the page, like any other. A keyboard user can tab past it without answering, and clicks still reach everything behind it.
A confirmation needs a modal dialog instead, one that blocks the page until it’s answered. When the browser shows a dialog as a modal, it puts it in the top layer, above everything else, and draws a ::backdrop behind it.
It also makes the rest of the page inert, so nothing behind the dialog takes clicks or focus, and a screen reader can’t reach it. The browser moves focus into the dialog, closes it on Esc, and returns focus to the button that opened it. The open attribute gives you none of that.