Describe the bug
Many of the prism themes are failing the color contrast checks that are run by cypress-axe. Many of the themes are close or are meeting "AA Large" but because of the font size the contrast needs to be a minimum of "AA".
So far I have checked (and fixed, see https://github.com/system-ui/theme-ui/pull/565):
To Reproduce
Run a11y checks on a site using Theme-UI and prism presets.
Expected behavior
Pass all a11y checks.
Screenshots
N/A
Additional context
N/A
Thanks for bringing this up! These color schemes are generated from the upstream react-prism-renderer library, so this could get overridden in the future. It might be worth bringing this to the attention of the maintainers of that library
This definitely isn鈥檛 an amazing ending, but it seems like we have three choices:
It seems like we鈥檙e doing 3 with the hopes of 1 for now. Leave it at that or do we want to solve this ourselves?
I don't think we should wait on 1 based on the comments in the other issue :/
I think we should fork the existing ones, make them have sufficient color contrast, and promote the forked more accessible ones in the docs. We can still provide the official ones in code, but I don't think we should promote them in docs.
My original PR up above had some fixed versions. It was pretty simple to just use your Colorable tool and tweak the contrast until it met cutoffs. That PR could be reopened and worked on.
There is also this which I found, but haven't looked into:
This is absolutely something that should be better, but I don鈥檛 think we should try to solve it in this project since these colorschemes are all from other packages. We鈥檙e going to close this issue & wait for the upstream libraries to update their colors.