Are you sure? How to write a confirmation dialog
I came across a few terrible confirmation dialogs/âAre you sureâ messages recently, like this one:
As theyâre so common, I thought Iâd go through some examples, and discuss what works and what doesnât.Â
Confirmation dialogs can be useful, in situations when a user chooses to do something that has bad or unexpected consequences. They aim to make sure that the user knows what theyâre getting themselves into - or out of.Â
Do you really need a confirmation dialog?
Be sparing with confirmation dialogs, because theyâre only used when you think that the user didnât really want to do what they just told you they wanted to do. If they did want to do it, and they can easily undo it, a confirmation is just irritating.
A better alternative is the option to undo an action, allowing a user to easily change their mind. Undoing means you donât need to second-guess whether your users wanted to do a thing or not. Google apps do this pretty well, even letting you change your mind about sending an email:
But in some cases - particularly for irreversible and damaging actions - they can still be useful. So how do you write one?
The traditional Windows confirmation
Hereâs an example of a classic confirmation dialog. The user opted to do something potentially damaging, so it checks that they definitely want to:
However, the action here isnât actually that damaging. Itâs not irreversible, like deleting something permanently, as itâs easily fixed by undoing. A confirmation dialog isnât *really* needed here.
The wording, âAre you sure you want to do the thing?â, can be cut down. âDo the thing?â is shorter and (usually) just as expressive.
The button options are Yes/No, but using these can make it harder for users to make a decision. They might have to read closely to understand what theyâre choosing, like here:
(To be fair, that dialog has bigger problems. The reason itâs unclear is not just that itâs a wall of text, but also that the question doesnât have a Yes/No answer - itâs âDo you want this thing or that thing?â.)
Making the choice clear
A confirmation dialog is asking users to choose what they want to do - so you need to make sure that choice is clear. That involves:
Making sure the user knows what consequences of the choice are
Reinforcing the choice in the button text
Clear consequences
The best time to use a confirmation dialog is when the user might not know their actions could have bad consequences. (For example, when deleting a file could stop your computer working properly.) To make an informed choice, they need to understand those consequences.Â
If you donât make it clear, itâs very difficult to make a decision. Take this example:
Itâs so badly phrased, itâs not clear what will happen when you choose either of the options. As a user, you donât know what you should do.Â
It isnât easy to make technical information like this simple for users, but itâs worth it - it makes the user experience so much better. In this case, the message could be something like this:
To refresh this page, Chrome needs to resend the information you entered. Any actions you took (like making a payment) might be repeated. Refresh/Cancel
Focus on the button text
Be wary of adding lots of explanation in the confirmation message, though. The more you add, the less likely it is to be read. And if youâre writing for mobile, youâve got very little space to play with anyway.Â
But if users read nothing else, theyâll look at the buttons. So instead, focus on the button text, because you can use it to make the choice youâre offering clear.
Using Continue/Cancel or Continue/Close is a good pattern for this. You can also go for âDo the thingâ/Cancel, as per Googleâs Material Design guidelines:
For particularly dangerous actions, you can use the button text to make them hesitate, heavily implying which one the user should choose:
Cancel cancelling?
Of course, that wording can backfire - when the action itself is cancellation:
In this case, there are a few better options:
Replace it with a Yes/No question, eg âCancel this process? Yes/Noâ
Be a bit wordier and more specific, eg âCancel this process? Yes, cancel process/No, continue with processâ
So, to sum up
Check your users actually need a confirmation
Clearly explain what the consequences are
Write concise button text that makes clear what theyâre choosing
(Thanks very much to Philip Guo and Zara Sheldrake for the âcancel cancellingâ screenshots!)













