Accessibility
- It is a native
<button type="button">, so Enter and Space press it anddisabledtakes it out of the tab order. - It always has a name.
label(or the catalogue'sclose) becomes itsaria-labeland the tooltip a sighted pointer user sees, so the two can never disagree. An explicitaria-labelstill wins for the spoken name. - The icon is
aria-hidden: the name is the words, not the glyph. - The focus ring is the library's one ring, 2px of
--nb-c-focus-ringinside the button with a 1px band of the surface. - Put it last in the tab order of the surface it closes. A dialog that opens with focus on its close button invites the user to leave before they have read it.