-
Notifications
You must be signed in to change notification settings - Fork 839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dangerous confirm modal best practices #6506
Comments
@markov00 Thank you for submitting this issue. I agree with you we should not be relying solely on color to identify destructive actions. Adding an icon to the primary (red) button could go a long way toward making the intent clearer. I have mixed feelings about flipping the buttons' function. My unresearched take is users are fairly accustomed to the "something destructive will happen" pattern. Flipping that might create more confusion. We could alleviate this by making button text more explicit like "Leave and discard changes" instead of "Confirm" for instance. That's too wordy, but more clearly highlights what will happen. |
Thanks @markov00 for opening this issue. According to our buttons guidelines, we shouldn't be using the word discard: And I agree that we should improve our examples toward a more positive attitude. I'll do research on the current practices in Kibana and I'll work with the technical writers' team to come up with better guidelines. |
Those are good questions.
I'm not sure why we don't recommend using discard, leaving without saving changes might be a good case for this. Here's an example based on those I saw in the description: Discard dashboard changes? @gchaps what do you think? |
A way to make those messages more positive would be to offer to save in the initial question rather than discard, and the same pattern I shared above would apply. Save dashboard changes? |
Thanks everybody for sharing your thoughts and knowledge.
I think this is the key! |
+1 to @florent-leborgne's suggestion: Discard dashboard changes? As we have found a reason to use "discard", we should remove that term from the "avoid" list. |
Thank you all, Based on the discussion and feedback, I'm going to update the EUI docs:
|
We have multiple modals in Kibana that are used to ask for confirmation when you are leaving an usaved work in a page. For example, Lens uses the following
and Dashboard has a similar one with a different action and color:
Following EUI example for dangerous confirm modals: https://eui.elastic.co/#/layout/modal#confirm-modal Kibana Dashboard should align to the practice and use the dangerous color for the primary button.
But I have a doubt: is that a good practice? The difference with the simple Confirm Dialog is just the color of the button.
I know that the text of the button is also different, but to me it looks like it can be confusing.
WCAG says that we should not use the color alone and I believe that in this situation we should probably improve it by switching the buttons roles: the primary button should not be the destructive one, but the less destructive: like the
Cancel
, or something better named likeContinue editing
. Where the destructive buttonDismiss/Discard/Delete/Destroy
should be placed on the other side with less emphasis to avoid hasty interactions.In this way we promote:
Interested to hear your thoughts
cc @elastic/kibana-design
The text was updated successfully, but these errors were encountered: