Never Use the Confirm Dialog

It’s a standard function of all browsers, it’s everywhere, and it’s time to retire it. Here’s an example from JIRA. Trying to “Cancel” a comment brings up the confirm dialog:

JIRA’s comment cancel confirm

Even if we assume confirmation is necessary, the standard confirm dialog is a bad way to get it:

With little effort we can make the dialog better. Let’s do it. We’ll use more thoughtful labeling to make the behavior clearer. For an added bonus, we can use color to highlight the riskier option:

Sketch of a better alternative

Already we’ve done better than the confirm dialog. But let’s not open the champagne yet. We can do even better. We’re still freezing the page every time the user clicks “Cancel”. This interrupts the user, second-guesses his decisions, and makes him repeat himself. Why shouldn’t we let him work, and provide the tools to reverse mistakes? Gmail does this to great effect:

A confirmation might be necessary in some circumstances. In others, an undo might be best. Either way, the standard confirm dialog is never the best option. Conciseness is always better than clutter. Clear labels are always better than generic ones. Never use the confirm dialog.