Take the 2-minute tour ×
User Experience Stack Exchange is a question and answer site for user experience researchers and experts. It's 100% free, no registration required.

I remember once reading an article that said whenever you present a messagebox with a Yes/No choice, you should always also provide a Cancel button, even if it does the same as No.

The rationale was that if the users know that Cancel is always the "safe" button to click if they don't understand why the message box was displayed, or are confused by the question.

mockup

download bmml source – Wireframes created with Balsamiq Mockups

I've followed this advice for years (even though I can no longer remember where I originally heard it), but a number of people have complained about it, saying that they would prefer a simple Yes/No.

So now I am wondering whether it is (or ever was) in fact best practice. If a message box presents a Yes/No choice, should it also offer Cancel (in the case where Cancel and No have the same effect)?

share|improve this question
4  
Related Question: Is a cancel button necessary in a windows form? –  Benny Skogberg Nov 21 '12 at 10:25
    
Isn't the little 'x' for closing the dialog the equivalent to 'cancel'? –  greenforest Nov 21 '12 at 10:25
    
@greenforest this famous little 'x' is not there on OSX, neither is the red point, you have to answer ! –  leMoisela Nov 21 '12 at 10:41
3  
@leMoisela The question is not for OSX, at least if the tag 'windows-os' was set on purpose –  greenforest Nov 21 '12 at 10:45
6  
Anther related questions Should I use Yes/No or Ok/Cancel on my message box? with links to the Microsoft and Apple UX guidelines and examples from those guidelines. If your application runs on Windows then you should follow those guidelines regardless of the advice you receive here - except for this advice of course :). –  user1757436 Nov 21 '12 at 11:27

6 Answers 6

up vote 29 down vote accepted

Undo

No, I don't think you should. Instead, you think re-think the whole idea. First of all: do you really, really need a popup dialog with a question like this? Wouldn't an easy to use, reliable Undo option be infinitely better? In that case, you can circumvent the whole Yes/No confirmation, and avoid context switches and generally getting into the users way.

Actions on dialog buttons

And if you really need a dialog box here: instead of putting Yes and No on your buttons in there, why not put the actual action on the buttons? You can do that by rephrasing the text in the dialog (which I hope you phrased so horribly on purpose here), and then name the Yes button "Invert" and the "No" button "Cancel" instead.

In general, I think it is wrong to have two differently named actions in a UI that do the same thing. That leaves users confused as to what are their differences. After all, if there is a Cancel button, it must do something else than No, right? So what exactly is that difference? You know the answer is "none", but does your user?

share|improve this answer
5  
+1 Specify the action intent on the button, instead of affirming or denying a block of text, which may otherwise foster in the spirit of "TL;DR;" errounous user choices. –  JustinC Nov 21 '12 at 21:09

I think it depends on the context in which the dialog pops up.

Context 1: A standalone/independent action is performed ("Add item to favorites?"). In this case the yes/no -only options should be fine. It is a 'safe' situation, so there is no need for a 'cancel'.

Context 2: The action is part of a process, or will kick-start a process (imagine this to be a 'dangerous' situation, depending on your definition of safe/dangerous). Let's imagine the user is working on a text document, and closes the application without saving first. There may be many documents open at the same time, and the "process" involves looping through the open documents, and asking the user "Do you wish to save your changes to xxx.doc?". Let's consider the options:

Scenario 1: [Yes / No / Cancel]

  • "Yes" saves changes, and (eventually) closes the app.
  • "No" doesn't save changes and (eventually) closes the app.
  • "Cancel" doesn't save changes (it does the same as 'No' in terms of the original dialog question), but doesn't close the app. The process/loop ends immediately, and all the documents remain available for editing (app reacts as if the user didn't try to close it).

Scenario 2: [Yes / No]

  • "Yes" saves changes, and (eventually) closes the app.
  • "No" doesn't save changes and (eventually) closes the app.

The only difference came with the assumption that the app makes on what the user actually wants to achieve by closing the app (either clicking the close 'x' button, or pressing some short-cut key). Specifically, do the designers anticipate that users may close the app by accident (in general: will someone kick-off a difficult/impossible-to-reverse process, or find themselves in a 'dangerous' situation, and if so, should we allow them to get out of it / stop it somehow?) In this case, I think erring on the side of caution is better (include the 'cancel' button, even though it achieves the same effect as the 'no' when considering the wording of the dialog message).

As always (irrespective of "situation") I think the wording of the dialog message is the most important.

share|improve this answer

Words are superfluous once you get this message:

enter image description here

I particularly like that they stress "which is usually much worse"...
Just make up your mind... Yes or No

share|improve this answer
2  
"I don't want to lose my changes, but I don't know if the computer did something to the file and it says changing it is worse and - and - and ..."... I get that it makes sense for that program, but that is not the message you want to use for the "average" user. –  Izkata Nov 21 '12 at 16:02
3  
I'm more concerned about the fact that they suggest throwing away your changes in favor of those from source control. You can manually merge the two sets of changes after the fact as long as you have both but if you destroy your non-controlled changes they would need to be recreated from scratch. Destruction of data should never be the recommended option. –  Dan Neely Nov 21 '12 at 21:01

IMHO, in short, approach should be like this:

  1. If possible, avoid the popup, at all, as suggested by Andre. Try to handle programmatically.

  2. Define the exact reason/matter you are asking user. Make the text simpler, and simpler. Don't try to intimidate user; rather just inform. In short.

  3. Don't overload the user with information. The above example by Jorn, is quite exemplary. Over-information even turn-off experienced users, let alone newbies.

  4. If the action, that will be decided by the user, is irreversible or out-of-scope for the software(e.g. exiting without saving), then include "Cancel". Else just don't.

  5. Make sure that you have set "the safest choice" as default.

I think, placement and font-size of "Yes"/"No"/"cancel" button is another topic to discuss here.

share|improve this answer

It also depends, a common scenario for me in Photoshop is where I am accidentally closing a file and I don't want to press Yes or No as that would close the file so I press cancel to return to it. These types of circumstances are exceptions for me, where saving is involved and you may just want to make it easier for the user to cancel and return to what they were doing.

share|improve this answer
    
+1 for this. I'd say it's situational, but if you're attaching it to something like a close project or exit command, then you should offer a cancel button as a means of cancelling that action. "Save before exiting? Yes/No" only gives them the option to choose whether they want to save, regardless of whether or not they didn't want to exit. –  Terrance Shaw Nov 22 '12 at 8:20

I think that on general, you should avoid buttons of Yes\No. these buttons loose the meaning context of the question and are very general. thus, the user needs to over think the question laying in front of him. it is suggested to use a meaningful text inside the button which depicts the question. for the example you entered i would have put the following buttons:

  • invert
  • don't invert

thus, no cancel button is needed.

for refrence why your form buttons should never say submit

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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