w3c / wai-minimal-header-design

Repository for work regarding the redesign of the supporting documents of WCAG
https://w3c.github.io/wai-wcag-supporting-documents-redesign/
1 stars 3 forks source link

Remove syntax highlighting because can be perceived as colourblind friendly? #73

Open hidde opened 3 years ago

hidde commented 3 years ago

(this issue was created by request of brewerj)

Background: in the AGWG mailing list it was noted many of our HTML examples use green and red as to distinguish different parts of the syntax. This is not because of the syntax highlighting theme we use (a11y-syntax-highlighting), it is because code examples in Techniques don't have language indication, so we use a tool that guesses the language, and it guesses some of our examples are XML, when they are HTML.

brewerj commented 3 years ago

Let's defer adding color syntax highlighting till phase 2, to allow time to sort out more carefully colored syntax highlighting, so as not to go against WAI best practices of color-blindness-friendly color choices.

hidde commented 3 years ago

I suggest we keep it:

I think these outweigh the point that it may not be a good look to use green and red together in some occassions, or the point that we would want to be a colourblindfriendly website.

brewerj commented 3 years ago

Additional clarification: getting better customized colors would require coding in a way that AGWG may not want to support. So, it's unclear if it will be possible, in this context, to do the color-blindness-friendly syntax highlighting.

My understanding then is that it's even more important to have additional input on this before deploying, so I still recommend for Phase 2.

brewerj commented 3 years ago

...Hidde is noting that the previews do actually pass color-blindness friendly tests -- that may change things. He will add screen shots.

hidde commented 3 years ago

I have taken screenshots of emulators for a number of different types of colour blindness and it seems, if the emulator is correct, our HTML colors are distinguishable for all but one (full colour blindness or Achromatopsia; but that's not fixable with different colours):

8 screenshots of code, with headings Deuteranomaly, Protanopia, Deuteranopia, Tritanomaly, Protanomaly, Tritanopia, Achromatomaly, Achromatopsia
brewerj commented 3 years ago

Thanks Hidde for this additional info. Interesting.

We've had a few instances before where WAI has deployed something that appears not to meet our own guidance, but actually does. When we've built in clear explanations or disclaimers right in proximity to an apparent violation of our own guidance, that's gone OK.

When we haven't explained the apparent violation of our own guidance, it has become a problem, on two levels: the people who think we're violating our own guidance publicly question why they should follow our other guidance (which is hard to respond to well once that theme starts, even if we were "right"). Also, we're missing an opportunity to model certain guidance clearly.

If we go the disclaimer route, in this case, since the apparently-not-color-blind-friendly syntax highlighting is distributed throughout the entire resource, we would need to figure out a lightweight, distributed disclaimer, then review that to make the disclaimer itself isn't confusing. That's hard to do on the fly -- it needs someone to develop and propose the disclaimer -- and it needs review. That would put this into phase 2 (e.g., needs feedback from EOWG).

If we go the route of using more obviously color-blindness-friendly syntax highlights, we'd need Michael's input on how that technical approach would work in the WCAG documents, and he'd need time to do it, which I'm guessing would be hard during TPAC.

So my recommendation from earlier this week remains:

Let's defer adding color syntax highlighting till phase 2.

I do like the idea though, and am hoping we can figure out a way to do this with color-blindness-friendly syntax highlights in phase 2.

hidde commented 2 years ago

’Defer‘ sounds like doing some work later, but just to be clear, ’defer‘ in this case means someone from our team will have to go in and do the work of removing syntax highlights. ’Defer to phase 2‘ means ’adding an extra task to do for phase 1‘.

I'd like us to also consider backlash that could come from lack of syntax highlighting. Without syntax higlights our code examples are harder to use, for people with and without disabilities and especially for people with cognitive impairments, for whom highlights could make code especially more digestable. It even net benefits people with most forms of colour blindness, as shown in the screenshot.

Removing this costs time, it adds an accessibility barrier and a usability barier, with no (?) user benefit.

Btw, it was described by JF as ’not a hill to die on‘, so arguably a decision to not remove highlights would be in the spirit of AGWG comments in this case (and as I said, very glad to have received the comment so we could investigate).

brewerj commented 2 years ago

Clarifying next steps:

hidde commented 2 years ago

Strongly recommend not to add a disclaimer, this colour scheme is colour-blindness-friendly, even the original commenter said they would not die on a hill for this, and if we get questions we are in a strong position to answer them. Adding a disclaimer would deprioritise the end user, because it adds the cognitive burden on them to understand what's going on.

Strongly recommend not to look for other colours, but instead find out how we can mark this code as HTML (currently gets recognised as XML, hence strange colours) (see example of when it would get highlighted as HTML in the README of the colour theme we're using).

shawna-slh commented 2 years ago

site-wide issue https://github.com/w3c/wai-website/issues/267