In our application, we show warning popup about unsaved data and that popup contains following message with two buttons OK and Cancel

You've unsaved data. Do you want to continue?

If we look at the message, it has polar question for which possible answers are Yes or No

For polar questions like Are you hungry?, we'll never have answer Ok or Cancel.

Hence I think that warning popup should have Yes/No buttons instead of Ok/Cancel. Could someone please help me to understand if my approach is correct?


2 Answers 2


The idea is to communicate to users. Usually ok/cancel is a notification if they wish to proceed such as "Taking the following action will delete your data 'OK' or 'Cancel'" Whereas the yes/no is for a user specific choice such as "Do you wish to delete all your data now 'Yes' or 'No'".

As you can see these overlap and human nature and language overlaps them as well. Usually there is either a theme on consistent usage or the Yes/No is utilized in the areas where the application is drawing stronger attention to the user vs. less critical attention with the Ok/Cancel. Deletes, major impactful actions, etc... would have the yes/no and the other regular less critical navigations would have the ok/cancel.

This really depends on the style of the site and how it's working. There should be a pattern with it though that matches the user intent.

P.S. There is also a grammar element, so which ever one you choose make sure the question is worded to go along with the yes/no or ok/cancel.


Yes the approach in this case(You've unsaved data. Do you want to continue?) is correct. We should use YES/NO buttons. Moreover these days most of the software testing companies are following this approach.

Cancel button is usualy used at the situation where a process is in ongoing state.

Ex: When user tries to close the ongoing software installation wizard then a warning popup appears saying "Exiting the software installation may cause issue/errors in the software. Are you sure, you want to continue?" Continue - Cancel

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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