Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The text contrast rules should not exclude text in active user interface components #1791

Closed
dd8 opened this issue Feb 8, 2022 · 2 comments · Fixed by #1961
Closed

The text contrast rules should not exclude text in active user interface components #1791

dd8 opened this issue Feb 8, 2022 · 2 comments · Fixed by #1961

Comments

@dd8
Copy link
Collaborator

dd8 commented Feb 8, 2022

Both contrast rules exclude text in active and inactive widgets:

This rule applies to any visible character in a text node that is a child in the flat tree of an HTML element, except if the text node has an ancestor in the flat tree for which at least one of the following is true::
widget: the ancestor is a inheriting semantic widget; or

https://act-rules.github.io/rules/afw4f7
https://act-rules.github.io/rules/09o5cg

but the corresponding SCs only exclude text in inactive widgets:

Incidental: Text or images of text that are part of an inactive user interface component

https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html
https://www.w3.org/WAI/WCAG21/Understanding/contrast-enhanced.html

SC 1.4.11 understanding non-text contrast is clear that the text contrast SCs should apply to text inside widgets:

If a button with text also has a colored border, since the border does not provide the only indication there is no contrast requirement beyond the text contrast (1.4.3 Contrast (Minimum)).

Default link text is in the scope of 1.4.3 Contrast (Minimum), and the underline is sufficient to indicate the link.

https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast

@Jym77
Copy link
Collaborator

Jym77 commented Feb 10, 2022

The extra difficulty with widgets is that we should test contrast in various "states" (visited links, focused widget, …) The rule initially excluded them because we didn't want to handle that extra difficulty at the time.
It should indeed handle them or having a rule dedicated for widgets. We've had some discussion about the idea last year.
See #1511 for longer discussion on the topic and links to even more discussions…

(note that this is "only" creating false negative (errors we don't spot), which is OK-ish; obviously not good for coverage, but not breaking the format either…)

@Jym77
Copy link
Collaborator

Jym77 commented Feb 11, 2022

See also the discussion at #1763 and yesterday's CG call where we agreed we can drop the "no widget" restriction and we'll see later if/how we do something about states…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants