picocss / pico

Minimal CSS Framework for semantic HTML
https://picocss.com
MIT License
13.41k stars 388 forks source link

Change button colors for better accessibility #123

Closed fkosmala closed 7 months ago

fkosmala commented 2 years ago

Hello and Happy new year !

I used PicoCSS (dark theme) for a small project that I want to be as accessible as possible and PicoCss have a small problem of contrast (you can check this on A11y color checker or any WCAG checker.

Can you make a better contrast on button, please ? (use darker background with white text or lighter background with black text)

Thank you very much

matjazpotocnik commented 2 years ago

Hi! I think there are some other accessibility issues too. I know I can change CSS custom properties (variables) but would be nice to have that fixed.

lucaslarroche commented 2 years ago

I am open to more contrasts. It is important. I have not always checked the accessibility of the colors.

Could you suggest changes in the default theme? (ideally directly in the SCCS files) What tools do you use to check accessibility?

matjazpotocnik commented 2 years ago

There are many tools available, I use WAVE Evaluation Tool and Siteimprove accessibility checker, available in the Chrome/Edge store. CSS overview in Dev tools can provide basic contrast issues. I'm not very familiar with SCSS so I'm testing with this demo: https://picocss.com/examples/classless/ with Light theme as I can see compiled colors and can test in the browser.

I guess there are more bits here and there?

pauloxnet commented 1 year ago

I also have founds low contrast ratio scanning my Pico-based website with Google Lighthouse:

Background and foreground colors do not have a sufficient contrast ratio. Low-contrast text is difficult or impossible for many users to read. Learn more.

Can we open a PR based on @matjazpotocnik suggestions ?

lucaslarroche commented 1 year ago

Lots of good thoughts and ideas here. Thank you.

I'm conflicted here:

See also #194

Feedback and though are welcome. Of course, I'm open to a PR.

lucaslarroche commented 1 year ago

I opened a discussion here: https://github.com/picocss/pico/discussions/246