ocaml / ocaml.org

The official OCaml website.
https://ocaml.org
Other
161 stars 321 forks source link

Add Accessibility-Checking to the Continuous Integration #835

Open sabine opened 1 year ago

sabine commented 1 year ago

To improve the accessibility of ocaml.org according to the Web Content Accessibility Guidelines (WCAG) international standard, it makes sense to introduce an accessibility-checker tool to the CI.

This will give us early warnings and errors when we unknowingly violate accessibility standards and guidelines.

One potential tool (brought to our attention by @shindere) is https://asqatasun.org/.

edwintorok commented 1 year ago

If possible please use the upcoming WCAG3 algorithm called APCA for evaluating visual contrast. The WCAG2 algorithm has some issues considering text as readale when it isn't, particularly affecting dark mode: https://github.com/Myndex/SAPC-APCA/blob/master/documentation/WhyAPCA.md#and-the-problem-is-particularly-severe-for-dark-mode There is even a backwards compatible "bridge" algorithm that uses the new contrast algorithm while making the output WCAG2 compatible (i.e. it passed both the new improved algorithm, and WCAG2 and only relies on input that WCAG2 would have): https://www.myndex.com/BPCA/ I know Chrome has built-in support for the new algo, but I'm not sure what other automated tools would, if I find any I'll add some suggestions here.

sabine commented 1 year ago

Good point. Thanks for bringing that up. I wasn't aware of the shortcomings of WCAG2 wrt dark mode, but I did notice that making a dark mode that "feels right" does end up with fairly high contrast values. We'll make sure to check that the tool we integrate is moving fast wrt WCAG3.

shindere commented 1 year ago

sabine (2023/01/18 04:10 -0800):

To improve the accessibility of ocaml.org according to the Web Content Accessibility Guidelines (WCAG) international standard, it makes sense to introduce an accessibility-checker tool to the CI.

This will give us early warnings and errors when we unknowingly violate accessibility standards and guidelines.

One potential tool (brought to our attention by @shindere) is https://asqatasun.org/.

Yea, it seems it's the only tool available for free and which is compatible with CI.

One thing to keep in mind is that, unfortunately, checking whether a page is accessibleor not is not something that can be fully automated. Only 30% ofthecriteria can actually be verified automatically. To give an intuition about why this is so, deciding whether a picture has an alternative text can be automated, but deciding whether this alternative text is relevant can not (yet?) be automated. In the same vein, deciding whether a picture is decorative only (andshouldthus have an empty alternative text) or carries information (and should thus have a non-empty alternative text) can not bedecided automatically.

But automating what can be automated definitely remains a good idea.