Which is the right order for arranging buttons in a dialog box?
:) OK Cancel
unless you live in a locale or an app that has the opposite as convention.
Depends on if you use windows or mac.
IIRC, Windows guidelines suggest OK-Cancel, whereas Apple recommends Cancel-OK
To me it does not matter to much about the order. It is all about consistency. If you do it OK-Cancel it should be that way throughout your entire app.
Though it is hard to stay consistent with everything since Microsoft can not stay consistent. They have so many different orders and buttons its a little silly.
Depends on the platform, most desktop environments have Human Interface Guidelines (HIGs) that will define what the standard is. Always follow the platform standard, conventions and consistency always win.
Some HIGs:
I think OK-Cancel. Because you want the affirmative answer first? "Yes-No" not "No-Yes", right?
You should try, whenever possible, to use verbs instead of OK/Cancel. When closing an unsaved document it should be Save/Don't Save or if an error pops up it should be Continue/Cancel etc.
OK is the default, and most left-to-right languages expect the default first, so OK, Cancel.
For right-to-left languages it's Cancel, OK.
Like others have said, it really depends on your platform.
The best way to find out is to look at a few applications that come with your operating system and see how they lay out their buttons.
If you're working in Javascript, you won't have a choice - the browser will pick for you!
I agree with Boris, it is just a convention thing. That is why they are there.
The order doesn't matter, all it matters is that it's consistent. Follow the platform guidelines if there is one, if not, at least be consistent within your own app.
One thing that is important is to have the default answer appropriate to what you're asking. If you're asking "Are you sure you want to quit?", after the user selected "file/quit", the 'yes' should be the default. If you're asking "Are you sure you want to format the entire drive?", the default should always be 'no'.
The only correct answer, as others have pointed out, is to follow your operating system's conventions and guidelines.
Be consistent with your environment.
But if you have a choice, use specific words in the dialog box, not "OK" and "Cancel" or "Yes" and "No", so that the user doesn't have to figure out what you mean by "OK"...and you can put the answers in the order that makes sense for your app and users.
As others have said, match the environment of your application. There is one gotcha to this though, the web. What's correct there if you have an in page form or AJAX dialog?
I'd in that case say.. match your environment! Detect the user's operating system through the browser and provide CSS with both orders depending on what they are running.
Jakob Nielsen (usability guru) has written an article about this very subject.
It's a good article, but it essentially boils down to making sure you're consistent (within your application, with the host operating system, and with your users expectations)!
One reason for placing the affirmative choice first is to allow keyboard navigation to work faster for the default case - one less tab keypress on every operation that throws up this dialog could save some annoyance for the users.
Having said that, you're probably best off following everyone else's advice and going with consistency.
You probably shouldn't be using OK/Cancel or Cancel/OK because it's not a very good description of what's going on.
However, assuming that the words themselves are not the essence of your question, but you're actually answering any affirmative/negative style question in a form:
It really depends on the location of your other affirmative answers. Imagine that you're going through a form, and like most forms all of your affirmative responses are on the right (Continue, Edit, Print, Order and so on), and all of your negative responses are on the left (Cancel, Go Back and so on), you can't reverse the process on individual pages.
I am not sure there is a write answer to this but i agree that what really matters is that what ever you pick you must then be consitant across your application.
I'd argue that it's more important to worry about which option will be selected when the user hits enter. I would say that you should have it set to whatever the user is most likely to select (assuming they're doing so purposefully that is).
You should always utilize "The Power of Sameness". Do things exactly like everyone else is doing so that your users don't need to learn a new user interface. Otherwise your users will hate you and use your competitor's product. Break this rule only if you have a really good reason.
Use the verb names directly. Rather than Do you want to save changes? - YES/NO? Prefer, What do u want to do? Save/Don't Save.
Check out my post for more details... http://blog.mugunthkumar.com/tech/elements-of-usability-design-okcancel-vs-cancelok-is-it-just-a-matter-of-taste/