Skip to content
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

A11y: Do not force colors in the color swatch and icon series #70862

Merged
merged 1 commit into from
Jul 4, 2023

Conversation

evictorero
Copy link
Contributor

What is this feature?
Show the colors in the Color Swatch and the Icon Series when the Windows High Contrast mode is active.
When forced-colors is active, all shadows are removed. That is why the color swatch appears to be empty.
Grafana relies on colors to display data, when the High Contrast mode is on it still makes sense to display custom colors in some cases.

This PR addresses the ColorSwatch and the SeriesIcon components so a user with High Contrast mode can still interact with the data visualization colors.

Before

before-high-contrast-color-picker.mov

After

after-high-contrast-color-picker.mov

Fixes #66311

Special notes for your reviewer:
If you don't have a Windows machine, you can emulate the same behavior with Chrome.
Open dev tools, cmd+shift+P, type rendering, change Emulate CSS media feature forced-colors to active

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.

@evictorero evictorero requested review from a team as code owners June 28, 2023 19:25
@evictorero evictorero requested review from joshhunt and L-M-K-B and removed request for a team June 28, 2023 19:25
@evictorero evictorero added this to the 10.1.x milestone Jun 28, 2023
@evictorero evictorero merged commit ddd96a3 into main Jul 4, 2023
21 checks passed
@evictorero evictorero deleted the evictorero/a11y-color-swatch-fix branch July 4, 2023 12:11
@ricky-undeadcoders ricky-undeadcoders modified the milestones: 10.1.x, 10.1.0 Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants