bevy-website icon indicating copy to clipboard operation
bevy-website copied to clipboard

Make incorrect code examples accessible

Open TimJentzsch opened this issue 3 years ago • 2 comments

Code snippets that are incorrect, i.e. that don't compile or give other errors, are currently styled with a red border and background: Example of an incorrect code example that shows up in red on the website

Unfortunately, this is not accessible. People with color blindness or who are dependent on screen readers might miss that this will not compile.

If possible, I suggest adding some styled text like "This will not compile" or something similar at the top of the box, or an other indicator that can be picked up by screen readers.

TimJentzsch avatar Jul 30 '22 21:07 TimJentzsch

I think a border should be enough. Alternatively, we can have accessibility options, maybe in the footer, with options to adjust the style according to the needs of the person.

Nilirad avatar Jul 31 '22 12:07 Nilirad

In my opinion accessibility should be the default and not hidden behind options. Especially because it's harder to find those options if you already have visual impairments.

TimJentzsch avatar Jul 31 '22 12:07 TimJentzsch