Description
Text has minimum contrast and the similar "enhanced contrast" rule has exceptions to Applicability for "inheriting semantic group
or widget
that is disabled".
I've seen an actual page, part of a dictionary with links for each letter, looking like:
<a href="a.html" class="good-contrast">A</a>
…
<a class="bad-contrast" aria-disabled="true">X</a>
…
because there is no entry starting with "X" in that dictionary.
Now, the "X" text has bad contrast, it has an aria-disabled
ancestor, which is matching our disabled definition (second condition: The element has a shadow-including ancestor whose aria-disabled attribute value is “true”.)
But, since the <a>
element has no href
attribute, it is no a link
: HTML AAM, thus not a widget
, and its text is excluded from the exception, i.e. applicable to the rule which flags it as bad contrast.
I think that in a case like that, the text should be part of the exception. It is, pretty much, "part of an inactive user interface component" to put it in WCAG terms.
I think we should be a bit conservative and only extend the exception to "a
and area
elements with no href
and aria-disabled="true"
", rather than, say, to anything with aria-disabled="true"
.