-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
UI: some elements have too low color contrast #8935
Comments
Thanks for the a11y audit! Would like to update the color palette to something that's perceptually similar to the current palette but with greater accessibility. I'm researching Colorbox.io from Lyft and Stripe's recent color system article to inform this. Edit: made a new issue for the SB design system to do this experimentation in a spike before integrating it in the main Storybook UI. |
Thanks for the great tool Storybook team! @domyen I'm glad to see you were making some progress on this. However, that's almost a year back and I'm wondering why it hasn't been fixed yet? Hoping we can prioritize that if possible :) So, I was about to file my own ticket but I'm glad this one is open. I think any tool that helps with component driven development ought to be an example of best practices itself—especially for a11y. But, there's a specific dev ux motivation to this as well, and it's for this use case…
Repro: Expected: Result: Having audited my own site recently, I can tell you these would be quite easy fixes involving dragging a slider slightly darker until it meets required ratio. Thanks again for the tool. We love it. Just would love if you make fixing contrast within Storybook's own chrome a priority 👍 -- thanks! |
@roblevintennis you probably want to audit your own components only. To do that, you can open preview frame in a new tab using "open in new tab" icon in top right corner |
Thanks @Hypnosphi -- I'll definitely keep that in mind 👍 |
Storybook is composed of a bunch of contributors from around the world. If you see an improvement, the community (and me!) would def appreciate your help. Would you be interested in submitting a PR to address some of the issues you found @roblevintennis? |
If I get time I will. It's limited at the moment. Perhaps a core contributor will get to it before I can. |
Just wanted to give this thread a bump, as it's been several years. We recently conducted an audit and noticed quite a lot of color contrast violations in the out-of-the-box palette—and not just for static elements, but also for visual focus indicators (VFIs) when you tab through the interactive elements. Happy to provide more detail if necessary, but it seems like there's plenty of pending work here already. |
See https://dequeuniversity.com/rules/axe/3.4/color-contrast?application=axeAPI
Links
Primary
Suggestion: change primary link color to #027ac5
Secondary
Same for subheadings
Suggestion: change secondary link and subheadings color to #6f6f6f. Change subheadings font-weight to 700 for compensation
Selected sidebar item
Suggestion 1: change background to #027ac5
Suggestion 2: change test color to #333333, change background to #81cefe
JSX highlighting
Suggestion: change tag highlight color to #26809c, change attribute highlight color to #eb0000
Button
Primary
Suggestion 1: change background to #eb004e
Suggestion2: change color to #333333, change background to #ff80aa
Secondary
See Selected sidebar item
Outline primary
Suggestion: change text color to #eb004e
Outline secondary
See Link / Secondatry
Bagde
Suggestion: change text colors to #427c27 and #bd3200
The text was updated successfully, but these errors were encountered: