Feedback
Dialog
A dialog stops the person with one question that needs an answer before they go on, such as skipping an item or deleting a file.
In kanso-ui as Dialog
Accessibility
- On the web, use
<dialog>opened withshowModal(), orrole="alertdialog"witharia-modal="true",aria-labelledby(the title) andaria-describedby(the body). - Focus moves into the dialog when it opens, to Cancel. Tab and Shift+Tab stay inside it, Escape closes it, and focus returns to the control that opened it. A destructive dialog never opens with focus on the destructive button.
- Buttons are 48 px high on phones (
size-control-lg) and at least 40 px on the web. - Contrast:
inkonsurfaceis 17.4:1 in light and 14.4:1 in dark; the body inink-muted6.7:1 and 8.1:1; Cancel inaccent7.6:1 and 8.2:1;on-inkonink16.7:1 and 15.9:1;on-criticaloncritical6.5:1 and 7.7:1.