E-mail List Archives
Thread: Compliance requirements for highlighted text
Number of posts in this thread: 2 (In chronological order)
From: megha patangi
Date: Mon, Sep 30 2024 1:40AM
Subject: Compliance requirements for highlighted text
No previous message | Next message →
Hello Web Aim team,
I have a use case where there is a table grid possibly with thousands of
rows, and there is a search mechanism to filter down the table content.
When a key term is typed in the search box, hit enter, we get search
results minimizing the rows, where any one of the columns may contain that
key term, and the same will be highlighted. Means if row 2 cell three has
that key term, then row 3 cell 5 has and so on, it will be highlighted
visually. This is just to visually map the filtered results, nothing more
than that.
In HTML we are using a 'mark' tag so the screen reader while navigating in
browse mode is able to identify it.
For highlighted text with its background, contrast ratio is more than 3:1,
and no additional visual clue is present.
Intent of SC 1.4.1 Use of color, says,
"If content is conveyed through the use of colors that differ not only in
their hue, but that also have a significant difference in lightness, then
this counts as an additional visual distinction, as long as the difference
in relative luminance between the colors leads to a contrast ratio of 3:1
or greater."
Alternatively it also says,
"However, if content relies on the user's ability to accurately perceive or
differentiate a particular color an additional visual indicator will be
required regardless of the contrast ratio between those colors. For
example, knowing whether an outline is green for valid or red for invalid."
As per first intent it seems we are good as ratio is more than 3:1, but
then what is the other part talking about?
In the above use case do we really need any additional visual clue to
identify highlighted terms, or are we good and compliant?
Regards,
Megha
From: Steve Green
Date: Mon, Sep 30 2024 2:01AM
Subject: Re: Compliance requirements for highlighted text
← Previous message | No next message
The first part is talking about scenarios where it is necessary to perceive change without needing to identify the actual colour. An example would be a focus indicator. You only need to be able to tell whether it is present or not. It does not matter if you perceive the wrong colour.
The second part is talking about scenarios where you do need to identify the colour. An example would be if a shape changes colour to indicate whether system settings are turned on or off, such as green meaning on and red meaning off. A person with colour perception impairment might be able to tell that some settings are a different colour from the others, but that is not enough to tell which ones are on and which are off. Some other clue is required, ideally text but maybe tick and cross icons.
In your case, it sounds like you are ok as long as you only use one highlight colour, in which case it will be possible to see if it is present or not. If you used two highlight colours to indicate different things, you would need the additional clue.
Steve Green
Managing Director
Test Partners Ltd