How to Make Sure Users Don’t Accidentally Delete

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.


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.

UI Design Kit


elegant wordpress themes

This Post Has 14 Comments

  1. Javier Reply

    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 Reply

    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 Reply

    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 Reply

    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 Reply

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

  5. Michael Reply

    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 Reply

    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 Reply

    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 Reply

    (CMD+Z) FTW

  9. Abhijit Reply

    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 Reply

    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.

  11. Thomas Reply

    Nowadays, physically deletion became rare. Thanks to big data, in most cases, data gets flagged as logically deleted or moved to another workspace. So let them click since undo is usually an option.

  12. Clément Jacquelin Reply

    This technique is used since a long time in the game “World Of Warcraft”. It’s used for rare weapons or item too. This “ux tips” saved me so many time.

Leave a Reply

Your email address will not be published. Required fields are marked *