4

Ask DN:Should I enable 'press enter key to confirm on a delete action' ?

8 years ago from , interaction designer

I am facing a UX problem and I want to ask for suggestions:

Should I enable 'press enter key to confirm on a delete action' ?

For example, User wants to delete a photo, there is a dialog ask 'Do you really want to delete it?' and the 'Yes' button is primary button. If user click on 'enter' now, it triggers the delete action. It behaves like this, because inside our application, all primary buttons have same behaviors. I think it is nice to keep consistency and provide some patterns user can learn. But use this pattern on a delete actions seems a little unsecure and risky...

Should I make an exception for this delete action? or Should I change 'Yes' to a non-primary button?

Thx :)

3 comments

  • Athyuttam Reddy, 8 years ago

    I would say it depends on how often the action is going to be used.

    If it's something like deleting a photo or a post, sure. If it's a more destructive and rarely used action like deactivating an account or deleting an entire collection of photos, probably not.

    For example, Facebook disables the enter button in it's account deactivation dialog. Similarly, GitHub forces the user to type out a repository's name before it can be deleted or turned public/private.

    2 points
  • Bowen LiBowen Li, 8 years ago
    1. The ability to delete and un-delete without dialogs is preferred over confirmation dialogs (Gmail does this well).

    2. If you need to use a confirmation dialog, using words like Delete/Cancel is clearer than Yes/No.

    3. You can still have keyboard input for accessibility reasons, but I would not make Delete the initial focus of the dialog.

    4. Delete is often an additional action type in addition to primary, secondary, etc. because often primary actions are green which is unsuitable for delete.

    1 point
  • Nav PaweraNav Pawera, 8 years ago (edited 8 years ago )

    If this action is undoable (which usually is a good idea anyways) then using the return key to confirm deletion sounds like a good idea.

    0 points