jenil / bulmaswatch

Themes for Bulma
https://jenil.github.io/bulmaswatch
MIT License
1.65k stars 144 forks source link

Accessibility? #73

Open ghost opened 4 years ago

ghost commented 4 years ago

First off, thanks for this resource. Incredibly helpful.

Any interest in adding a high-contrast theme, ie, one that ticks the WCAG contrast guidelines as closely as possible within the confines of the way Bulma does things? Some of the ones here already are way closer than the Bulma default, but they aren't quite there yet I think. This would obviously look way worse from the design standpoint, but it could be a huge service for users.

jenil commented 4 years ago

hey @ffmike, do you have suggestions on themes which are close enough and we can handle them on a case by case basis?

ghost commented 4 years ago

I ran all of the theme sample pages through the https://www.checkmycolours.com/ online checking tool. Here are the number of accessibility failures of each theme, as measured by contrast ratio:

cerulean: 529 default: 533 journal: 533 materia: 607 spacelab: 631 litera: 727 lumen: 741 cosmo: 745 sandstone: 1643 yeti: 1797 simplex: 1834 pulse: 1842 flatly: 1855 lux: 1866 united: 1941 minty: 1999 nuclear: 2799 darkly: 2857 slate: 2925 superhero: 3015 cyborg: 3067 solar: 3634

Obviously there are a lot of redundant checks here - if Title1 fails on contrast, so will Title2, Title3, etc.

Based on these numbers, 'cerulean' has the fewest failures, so it'd be the most reasonable starting point. It seems to me that a reasonable path forward would be to define a new 'highcontrastlight' that would start as a clone of 'cerulean' and then work to tweak it into a higher-contrast set of colors that passes the WCAG contrast tests (or at least gets sufficiently close to be useful to users who need the contrast).

I'm not sure why the dark themes are getting such bad scores. That's a problem for another day, though. Might be a failing of the checking tool.

If that sounds like a reasonable plan to you I could clone the repo and see how far I can get.

jenil commented 4 years ago

Hey @ffmike Sorry for getting back on this so late.

I think it definitely sounds reasonable and I'm happy to review a PR for this!