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 barely any effort we can make the dialog better. Let’s do it. We’ll use more thoughtful labeling to make the behavior clearer—and 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 just yet. We can do even better. We’re still freezing the page every time the user clicks “Cancel”, which interrupts his work, 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:

Depending on the situation, a confirmation might be necessary, or providing an undo might be best. Either way, the standard confirm dialog is never the best option. Conciseness is always better than clutter. Clearly labeled buttons are always better than generic ones. Never use the confirm dialog.