-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Command Palette: highlighted suggestions insufficient contrast #51582
Comments
I suggested a "Run command" text a la GitHub on the PR, but I like the arrow better. I wonder if it should be a chevron? It could also be a little [Run] chip design. But yes, it qualifies as a shape change. |
Single icon sounds like a good start and is easy to implement, and doesn't preclude revisits in the future. |
Good point on the chevron. I don't personally share the full concern, though I would think the regular arrow works better than the return. |
We may have drilldown commands one day too. |
We shouldn't need to wait on a global design decision in order to fix an extremely obvious accessibility problem. We can resolve the accessibility problem with a very simple design change to improve contrast; all of the other larger design issues can be resolved after fixing the accessibility issue. We need to keep in mind that fixing an accessibility issue has a direct and immediate impact on users who depend on it; it resolves a major user experience problem for the people it impacts. The other design issues need to be done with accessibility in mind, but should not block us from fixing an immediate problem. |
To close this issue, we only need a decision on the colors to use to highlight the suggestion. Those colors need to have sufficient contrast. The other design decisions on icons and consistency across the editor can be a follow-up. |
This unanswered question is what's holding up.
We should always push for consistency, rather than ad-hoc fixes (which results in varying experience like expressed in this comment above — but I do agree we need to resolve this. That saying, here's what we have today: And below are the options: RequestThe options above are based on other variants of existing flows within the editor. Do you mind detailing what won't work (and why), as well as what will work (and why). That would help clear the air and move this forward (as well as consolidating the other suggestion + selection flows). I would like to come to a solution that we can apply consistently everywhere, so in the future when something like this comes up there is a clear standard. cc @WordPress/gutenberg-design |
Any of the combinations that meet basic accessibility standards for color contrast will work. Beyond that, I have no concern about which design is used. Not knowing which colors are represented above, I can't say with certainty which of those meet standards. |
I don't think there's a standard around this, and it's more about consistency and color contrast than which specific style is chosen. That said, since the outline focus is used on the inputs and sometimes wrapper depending on context, that having a solid color background to show selection will be the best choice. Whichever solid color background that meets the color contrast guidelines (4.5:1 for AA standard) sounds good to me. The purple one is appealing, as it has strong contrast with both the text inside the color and against the white background. It also feels a bit more modern and bold to me. The light gray background makes it harder to see which one is selected since there's not much contrast between the light gray and white background. |
@joedolson I'm trying to work with you and move this forward. I personally have concern for accessibility and design—we do need both.
All options are placed on a Option one:
Option two:
Option three:
Option four:
Option five:
|
Did some Googling to confirm. I could be wrong, but I believe that to meet AA guidelines the color combinations need to pass two checks:
Out of those options, only option 2 meets those guidelines. The others don't meet the 3:1 contrast guideline between the selection background and command palette background. |
@richtabor I don't have any personal preference about the design choices. I favor the inverted contrast (2) and the outline option (5), because they offer a higher degree of visual affordance of the selection. I apologize for being curt in my previous response. @jeryj's description is accurate, as far as contrast is concerned. When color is the only distinguishing factor, both contrast requirements need to be met: the first describes the ability to see the text against it's background (readability) and the second describes the ability to distinguish which item is selected. However, because there's an icon present that also indicates which item is selected, the second color distinction isn't necessary - that color contrast distinction is only required if color is the only differentiation between selected and unselected items. What Jerry is referring to is success criterion 1.4.11: Non-text contrast. If the selection icon was also below contrast requirements, that would be a problem. |
Correct. Icons are assigned when a command is registered.
Yea, I'd rather lean on color to indicate selection rather than more iconography. |
In that case, yes - only option 2 achieves the needed goal. Based on the examples, it seemed like the icon was being used to indicate which item was active, but if that's not the case, we'll need to make sure all the color contrast baselines are met. |
Description
In the Command centre, users can 'highlight' suggestions by using the Down and Up arrow keys, or by hovering on them.
Worth noting this is not a real 'focus' style. Actually, focus is on the search input. The suggestions are highlighted and 'selected' via scripting. Nevertheless, since it is possible to select and activate the suggestions, users need to have a clear indication of what the highlighted / selected suggestion is.
The highlighted state style only relies on a subtle color change. Color only is not sufficient. Teh highlighted style needs a shape, whether it's an outline or a left border like in the classic admin menu.
Aside: I think this 'highlighted' style is used also elsewhere. It should be fixed wherever it is used.
Screenshot: hint: the fourth suggestion is the highlighted one.
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: