-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Improve consistency of the Cancel/OK button pairs #50518
Comments
Note: as I'm noticing more and more small inconsistencies in the UI, I'd like to propose to create a new dedicated GitHub issue label for that. Suggestions welcome. |
cc @WordPress/gutenberg-design |
I believe @richtabor would like to take a closer look at this issue. |
I don't personally think we need an issue for inconsistencies, but certainly tagging @wordpress/gutenberg-design will help keep them surfaced. |
Very nice. ButtonsBringing more consistency is what buttons are used for cancel/ok pairs would be the first step. Looks like some are using secondary, while other tertiary button styles. LabelsI don't think the labels themselves need to be 1:1 across the board. They should probably reference the action intended, as these are confirmations. I.e. "Delete Menu" confirmation modal of "Delete Menu", or simply "Delete", not "Confirm". Let's get clear on this before pushing PRs. The cancel action should always be "Cancel", which looks the be the case (just varying button styles). |
For accessibility, I'd strongly prefer that these actions always used the secondary style. It's a better user experience to be able to recognize controls and know their control boundaries. |
For reference: the lack of accessibility of the tertiary buttons is a long standing issue and it was reported long time ago in #23890 |
Description
In various parts of the UI, Cancel/OK button pairs are in use where the 'OK' button is the primary action (Save, Apply, Create, etc.). These button paris are mostly used within modal dialogs and popups. Turns out there's some inconsistency especially about the 'Cancel' button type / variant: sometimes it's a secondary button, sometimes a tertiary one. There's no apparent reason for this difference. Also, sometimes the alignment and spacing is not consistent.
Maybe consider to create a new UI component to ensure consistency and avoid repetitive code.
A few example screenshots:
Secondary:
Tertiary:
Tertiary:
Tertiary:
No type specified and inconsistent alignment. This will be likely fixed in #50384
Tertiary:
Secondary:
Tertiary:
Tertiary:
Tertiary:
Tertiary:
Edge cases:
Edit site > VIew mode > Save modal dialog:
Guide modal dialog: Previous, Next, and Finish buttons:
Note about the tertiary button accessibility:
Worth reminding the tertiary button isn't fully accessible as it relies only on color. In absence of color, this button is not distinguishable from normal text as there's no shape to identify the button or any other styling to do that (for example an underline).
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: