APA has no accessibility concerns regarding the substance of CSS Color Module Level 5 (we reviewed the 2022-06-28 WD).

We’re aware that color-contrast() has been pushed back to Level 6. However, we were wondering what are the use cases for this function? The function selects from a pre-determined list of colours; are there situations in which the answer could not have been determined at design time? We don’t feel that this function is required in order to further accessibility, but we’re happy to provide any needed support in adding it, if you wish to add it or something similar in future.

It’s clear that a lot of effort has gone into making the document clear, but we did notice some accessibility barriers, particularly from the perspective of readers who may struggle with color perception. These concerns, with suggestions, are detailed below. [APA Note: these will be filed as separate GitHub issues.]


Accessibility suggestions on the document’s presentation

General: color previews

Naming colors

The color preview feature could actually be very helpful to people with vision impairments that currently have to rely on the text. Whilst they can currently access all of the detailed coordinates for every color, this doesn’t give them much of a sense of what the color might look like, making the examples hard to follow. The document describes some of the “preview” colors, but not all.

I found a tool that gives you the closest color name to a given hex color, from an extensive palette of predefined colors. This sort of tool would give a good enough idea for most people who may be unable to perceive the colors directly. The color names could be generated as part of the document build process, and placed in visually-hidden text in the document. The text should also indicate if the colours are transparent.

One such tool is “color-to-name” (https://github.com/stanleyfok/color-to-name)—however, a small number of the color names in the palette may be considered vulgar, so they would either have to be filtered out, or a different tool selected. (I am looking into the latter, though so far this tool was the most expressive of the ones I found.)

I noticed that out-of-gamut colors are indicated by a red border on their previews, and they’re always described in accompanying text as being out of gamut, which is helpful.

Keyboard operability for the previews

The color previews can be hovered with the mouse. When this happens, they enlarge, covering some of the text behind. This is particularly useful if the preview is of a transparent color, as the text behind shows through the preview window. It is not possible to activate the preview with the keyboard, so keyboard-only users would likely miss out on this helpful feature.

Previews in <pre> blocks—rendering bug

The previews inside code example blocks can’t expand outside of those blocks, so aren’t drawn fully in those cases.

General: Test result indication

This is quite possibly a bug in a library you’re using, though I couldn’t find any pointers after a brief search relating to WPT.

There’s a low contrast difference between the two sections of the pie charts. This is particularly apparent in §4.

Suggestion: use techniques similar to those from Figure 21 in the Understanding WCAG SC 1.4.11 document, i.e. (1) separating the segments; (2) using more contrasting colours; and/or (3) using hollow and solid segments to ease differentiation.

§2.2

Example 2

Example 3

The above two issues apply here too.

§3.6

Example 22

In the spirit of the issue reported above, we don’t feel this needs extensive alt text (though describing the axes and general situation would be helpful). However, it would be particularly helpful to ensure that the different colors can be identified on the plot, e.g. via labelling.

§4.4

Figure 5

Example 33

Color previews are missing.

§5

Figure 6