Skip to main content Accessibility Feedback

Non-modal dialogs

Last week, I wrote about the dialog element, and how to use it to replace alert(), confirm(), and prompt().

I got a lot of great responses, but I wanted to specifically bring your attention to two of them.

First, accessibility advocate Hidde de Vries pointed out that there are valid reasons you might not want to open a dialog element as a modal.

Not everyone likes modality—as a UI concept, they are very disruptive. Use the pattern sparsely, only when disrupting is very much necessary. If you want to ask the user “Are you sure you want to delete all that?”, go ahead and make it disruptive. If you want to promote your newsletter sign-up or advertising, the disruption is unlikely to be appreciated.

And Dave Cross tipped me off to his awesome “stuff browsers give you for free” YouTube series, including an episode on the dialog element.

Dave goes into a bit more detail than my article did, so if you want to learn more, it’s definitely worth a watch!