When a user is about to perform a destructive action that cannot be undone, what should the default selected option be on the confirmation/warning dialog box?

In this example, the user is about to perform an action that merges all his/her libraries into one: enter image description here

Example 1: Default selected action is "Merge" - if the user hits enter/return at this stage the action is performed. If the user accidentally hits enter/return the user is not going to be happy.

Example 2: Default selected action is "Cancel" - if the user hits enter/return at this stage the action is canceled. If the user accidentally hits enter/return the user will be annoyed and has to do the process over to get to this state again.

Looking at heuristics and usability guidelines I would think that you would want to avoid errors and mistakes made by users. At the same time you don't want to interfere with their flow. One can argue that the dialog stops them before performing a destructive action so therefore the dialog is enough.

If I think about my own flow when dealing with these kinds of actions when using Windows and Mac, they both set the default selected action to the destructive action, see example 3 below.

In example 3 I have right-clicked on the trash can and chosen to empty trash. The default action is "Empty Trash". As mentioned this exact behavior happens on Windows when you empty the recycle bin.

enter image description here

Does this mean that the convention is to have the action the user wants to perform in the first place should be the default selected action?

What should it be?

There has been a similar kind of question, but it was more aimed at saving changes which is different from this question.

2 Answers 2


The default should definitely be the safer action in the large majority of cases.

See The Visual Weight of Primary and Secondary Action Buttons which I linked in an answer to a similar question:

enter image description here

The primary reason for this is so someone just "clicking through" the dialogs won't do anything harmful. Due to long term abuse of the modal dialog to confirm dozens of common actions, many many users have been trained to simply click the apparent default action the instant they appear, often before they can read and understand exactly what the error was.

However there are multiple factors at play here; the biggest ones are whether the action can be undone and how sure you are the user wants to perform the action. The thing about emptying your computer's trash is you've already confirmed which items go in the trash; clicking delete on those items was your confirmation of user intent, so when the empty trash dialog pops up, you're pretty sure they really want that stuff gone. In addition the menu is hard to access accidentally.

In contrast, compare in-app purchases in iOS; the default is always on Cancel. Generally speaking the OS can't "know" how sure you are when you activated the in app purchase icon. In many (infuriating) games it can be very easy to accidentally press the button. S

Similarly, if a destructive action comes up by a keyboard shortcut the user might not be expecting the dialog. If it's easy to accidentally bring up a dialog, default to cancel. Emptying the trash generally requires a right click + select a menu item in a dropdown; fairly hard to do on accident.

How easy it is to undo is also very important; in an administrative interface, deleting may be a very common, easily reversible action. In this case the workflow may be designed to make it easy as possible to delete (including keeping Delete as the default action) because reversal is easy and, presumably, your administrative user knows how to undo the action.


When I was in grad school in the late 90's, I was taught that the default should usually be "Cancel" for destructive actions, because it should be difficult to do something that results in loss of data. I still believe this is true.

I did say usually, though. In the case of emptying the trash, I think it makes sense for "Empty Trash" to be the default, because you already had several opportunities to change your mind. First, you either dragged the item to the trash or hit the delete key. In both cases, it's easy to abort (with dragging, you can abort before letting go by simply dragging back to where you started, and with the delete key, you can click "Cancel" when the dialog appears). Once in the trash, you can remove it from the trash at any time. So, it's pretty likely that by the time you actually decide to empty the trash, you're pretty sure of what you're about to do.

Another angle on this is that undo should be used more often than it is. If you've ever used GMail, you'll notice that you can undo most destructive actions. When you move, archive, or delete an email, for example, a banner appears indicating the action you just took and providing a link that allows you to undo the action. Now, you don't need a dialog at all, you just keep going about your tasks, uninterrupted. Only when you do something unintentional do you have to stop and think, but that should be pretty rare.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.