How to Make Sure Users Don’t Accidentally Delete

by on 01/27/14 at 10:25 am

Everyone knows how frustrating it is when you delete something you didn’t mean to delete. Whatever gets deleted is usually gone forever and the user is back to where they started. This is why it’s important to have confirmation windows when a user tries to delete. However, your confirmation window could still have users accidentally deleting. Sometimes users don’t read the confirmation dialog and just push the button because it’s easier. Sometimes they think they can undo their delete, so they don’t give it much thought. Sometimes they actually read the dialog, but accidentally click the delete button when they meant to click cancel.

How to Make Sure Users Dont Accidentally Delete

Whatever the case, users can make mistakes on confirmation windows. If the user is about to delete something important that they will never get back, it’s important that you make sure users are absolutely certain before they continue. Instead of giving users a confirmation button that they could mistakenly press, give them a text field and ask them to type the word “delete” to confirm. When the user types “delete” in the text field, there is no doubt that they want to delete. There is no accidental pressing of the delete button. There is no regret when the user deletes, because the confirmation text field makes them certain about what they’re going to do before they do it.


How to Make Sure Users Dont Accidentally Delete How to Make Sure Users Dont Accidentally Delete

Author and editor-in-chief of UX Movement. Loves great web experiences and fights for the user.

11 Responses to “How to Make Sure Users Don’t Accidentally Delete”

  1. Javier

    Jan 27th, 2014

    I’ve always liked the delete / undo approach because it doesn’t assume users are dumb, it’s not ideal for most use cases but it’s useful

  2. Alan

    Jan 28th, 2014

    I’ve never liked the “textbox” appreach because I think it affects UX. Especially if users delete thing very often.

    However, I do recognize is a good way to make sure that a user actually tries to delete something.

    I try to implement the “undo” approach, whenever possible

  3. Lucas Hall

    Jan 28th, 2014

    Chances are that the user had the mouse in their hand when they went into the action. In order to type the word “Delete”, the user must click the new field, then move their hand over to the keyboard to type. If they are smart, they’ll tab to the delete button, but some “mice-ers” will put their hand back on the mouse to proceed forward. This is somewhat of a cumbersome step.

    Although I do appreciate the first section of this article, there is another possibility that limits the number of actions a user must take and still effectively reduces the risk of accidental “fly-by clickings”.

    By better understanding how information hierarchy works on the popup, we can leverage the user’s tendency to be drawn to 1) design elements with great detail, 2) design elements which are of great contrast to the background, or 3) “siren-ing” through groupings or proximity. Additionally, Fitts’ law teaches us that if the target is easy to click, it carries more affordance for clicking than that which is smaller, and more difficult to get to.

    What if the “Cancel” button carried all the priority (maybe black on a white background) on the popup, and the secondary button was smaller and lower contrast to the background color (light grey on a white background). Sliding it to a far right edge of a popup will make it that much more difficult to click.

    Best way to know though is to mock both ideas up and have users test both.

  4. Dave

    Jan 28th, 2014

    I think asking a user to type the word DELETE, with the exact capitalization, is treating them like a child.

    Delete comes in lots of flavors – deleting a file, deleting an order, deleting a complete portfolio of pictures. Most are annoying if deleted but can be recovered. Asking someone to type in the word should only apply to the most severe cases, when large amounts of information will be lost or there is huge financial impact.

    • johnathan cardoso

      Feb 17th, 2014

      And how about replace the label and put a text if a regressive counter? like gmail undo idea or something?

  5. Michael

    Jan 29th, 2014

    I agree with the other commenters. This feels like an OK solution to the wrong problem.

    You’ve mentioned people like Undo, and that is a better solution. This idea does, as mentioned before, assume users are dumb and makes the overall experience poor, which effects the people who do intend to delete.

  6. Ann

    Jan 30th, 2014

    The “Acknowledge and Provide an Option to Undo” from the Android Patterns is a great strategy for less ‘critical deletes’. (Or ones that you need to be able to quickly/frequently.) But yes, the having to type DELETE when you – for instance – want to remove an entire mailchimp mailinglist does not really annoy me. I’m glad it’s there, tbh.

  7. Mike

    Jan 31st, 2014

    GitHub has one of the best implementations of this type of solution. When deleting a repository, they make you type the NAME of the repository in a text field. Better than simply typing delete, you are forced to recognize the item you are deleting before doing it.

  8. Updula

    Feb 3rd, 2014

    (CMD+Z) FTW

  9. Abhijit

    Mar 17th, 2014

    I lost all my website files because of a poorly designed delete action. So I do understand the importance of properly designing the delete action.

    Other than the design approach described above, there are other ways to prevent the user from accidentally deleting data like having a trash folder, undo action etc.

  10. Carlos

    Apr 30th, 2014

    I think the best approach in these cases is to use “Undo” option instead.
    With this approach, the assumption is that we have a “stupid” user.

Leave a Comment