-
Notifications
You must be signed in to change notification settings - Fork 795
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
axe core throws relying on color alone false positive issue when the link and surrounded text have same color #3848
Comments
This is not a false positive, if you look at the "fix this" section you will see that it is complaining that the text contrast with the surrounding text is too low - which is 100% accurate. @WilcoFiers should we change the help text to make it more precise? |
@dylanb Contrast is low here because the link and surrounding text has same color. The check supposed to be done only when we have a link text distinguished by different color (color alone with no additional indicators) with surrounding text, hence this is not a valid test here. We are not checking basic text contrast here. This is more of a usability issue and not A11y. |
@dylanb You can't fail it under 1.4.1 Use of Color when link text and surrounding body text are the same color because there is literally no use of color to differentiate the link text from the body text. |
Some additional context to this issue: w3c/wcag#1467 |
In the specific example, the link DOES have color to distinguish it from the background UNTIL you hover it and then it does not - so do we fail it under 1.4.11 because the hover state does not pass 3:1 from the surrounding text? |
@dylanb I don't see any change in color for the link text even on hover as well. Moreover user has additional indicators (such as hand symbol) to know it is a link and not static text. I believe 1.4.1 Use of Color refers to more of default state/behavior. @melaniephilipp Further thoughts? |
@dylanb 1.4.11 doesn't compare link text (in any state) to surrounding non-link text. It only requires "a contrast ratio of at least 3:1 against adjacent color(s)...". The adjacent color to the link text is its background - and that is covered by the higher standard of 1.4.3. (We fail the text in links that falls below 4.5:1 with their background in their hovered (or focused) state under 1.4.3.) |
looks like a false positive to me then |
I agree, axe-core should pass if the colors are identical. Good catch. |
@WilcoFiers Thanks for the confirmation. Do you have an estimate of release timing to remove the false positive? Thanks! |
Product
axe-core
Product Version
4.5.1 and 4.5.2
Latest Version
Issue Description
Expectation
If the link text and the surrounded text color are same, then this check should not take place as there is no color alone usage here.
Actual
Axe-core flags an issue here assuming there is color alone since there is no additional indicators for the link surrounded with text.
How to Reproduce
Screenshot
The text was updated successfully, but these errors were encountered: