Currently the delete confirmation dialog has this:
Are you sure you want to delete? Yes Cancel
Should there be a close [x] icon at the top right for the delete confirmation dialog? Is it a best practice?
User Experience Stack Exchange is a question and answer site for user experience researchers and experts. It only takes a minute to sign up.
Sign up to join this communityCurrently the delete confirmation dialog has this:
Are you sure you want to delete? Yes Cancel
Should there be a close [x] icon at the top right for the delete confirmation dialog? Is it a best practice?
Besides the scenarios of an application spawning lots of dialogs and the user trying to deal with them in a hurry, there is another perfectly legit situation:
What if the user doesn't understad your question? Where should they click?
Imagine your app happens to ask a musician wheteher it should rebase samples repository. Or your app gets translated to Spanish by someone lasy, and the dialog with a crystal-clear question doesn't make much sense anymore. My point is, no matter how careful you are when designing the UI, you cannot be sure that your users will never see a dialog which (in their eyes) reads
Do you want me to screw up your work? Probably Maybe
No matter how much time (within reason) the user will spend on this, his choice will not get any safer. This is why you need to provide an alternative answer which would be safe in most cases. It will not be 100% safe (it cannot be), but it should be better than clicking at random.
Now this is where the X button comes in handy. It will be readily perceived as a safe escape by most users, and it will be accessible to people who cannot, or are not comfortable with, hitting Esc on the physical keyboard (which should produce the same result).
It doesn't have to be big, mind you. You don't want to encourage users to click on it when they are capable of making an educated choice. But it should be there.
People sometimes just close the confirmation/warning dialogs without reading the content.
Removing the [X] button will somehow force the users to read the message in order to know whether to press [yes] or [cancel]. This is of course the purpose of a modal dialog and it would seem the right thing to do.
This may cause frustration for users that are in a hurry, especially if the system is constantly popping up dialogs in all kinds of irrelevant situations.
My recommendation is to remove the close button only if your system uses dialogs with care, only when they are absolutely needed. This way your users will be surprised to see one and understand it is something important that needs to be treated with attention.
Do always provide an X-Button unless you really need a distinct answer. Most people assume that clicking the X gets them back where they started without the need to answer the probably confusing question of the application. Most users who understand what they just did will choose an option, all others might click the X, that's my experience.
See this Question for another discussion in this topic.
The cancel button is usually used for something the user called.
if the dialog is a missclick, the user might just want to press the red x at the top since thats the first thing his eyes see when wanting to get out of an operation.
pressing [x] is like being asked a question and answering "no comment" and going away. if thats not a possibility in your dialog you might want to disable it after all.
If one of the options you are presenting to the user is Cancel
, then you should also have a close button [x]
as this is identical to pressing the cancel button.
If you don't have the option of cancelling ie Yes
/No
, then you should not have an [x]
because it is unclear what this will do. At this point the user is committed to doing something so they must choose yes or no.
Personally, just looking at the message you're providing:
Are you sure you want to delete?
To me, clicking the [x]
would be equivalent of not giving any response if you were asked that in fleshspace.
So, what would your reaction be in the real world? Ask the question again, or not perform the action? If it's the former, don't include an [x]
since it's not a viable response; on the other hand, if you'd just not delete it if the person ignored you, then include one.
I suppose really the answer depends on what you're deleting and when, but in most contexts I'd be inclined to repeat the question (ie no [x]
)