Modal

A dialog that traps focus, locks scrolling and gives focus back — none of which we wrote.

Built on Bits UI's Dialog, and that is the point of the middle layer. What
Bits owns here is the part that is hard and has nothing to do with Askr: the
focus trap, focus restored to whatever opened it, Escape, click outside,
scroll lock, `aria-modal`, and inertness for the rest of the page. It is six
months of work to get right and five minutes to get nearly right.

Verified in a real browser, not only in jsdom: twelve Tab presses inside an
open modal and focus never leaves it, Escape closes it, and the scroll lock
lifts.

**`title` is required.** A dialog with no name is announced as "dialog", and
that is everything the person who cannot see it gets. Pass `hideTitle` when
the heading is already visible in the content — it is hidden visually, not
removed.