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

axe core throws relying on color alone false positive issue when the link and surrounded text have same color #3848

Closed
1 task done
DQUday opened this issue Jan 6, 2023 · 10 comments · Fixed by #3861
Closed
1 task done
Assignees
Labels
fix Bug fixes pr A pr has been created for the issue rules Issue or false result from an axe-core rule
Milestone

Comments

@DQUday
Copy link

DQUday commented Jan 6, 2023

Product

axe-core

Product Version

4.5.1 and 4.5.2

Latest Version

  • I have tested the issue with the latest version of the product

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

  1. Launch the URL - https://online.citi.com/US/ag/investing/investingwithciti
  2. Select continue button on the modal.
  3. Now run the axe-core using axe Expert and axe DevTools
  4. Notice false positive raised for one of the links in the footer section where the link and surrounding text colors are same.

Screenshot

False Positive_color alone

@DQUday DQUday added the ungroomed Ticket needs a maintainer to prioritize and label label Jan 6, 2023
@dylanb
Copy link
Contributor

dylanb commented Jan 7, 2023

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?

@DQUday
Copy link
Author

DQUday commented Jan 9, 2023

@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.

@melaniephilipp

@melaniephilipp
Copy link

@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.

@melaniephilipp
Copy link

Some additional context to this issue: w3c/wcag#1467

@dylanb
Copy link
Contributor

dylanb commented Jan 9, 2023

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?

@DQUday
Copy link
Author

DQUday commented Jan 9, 2023

@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.

image

@melaniephilipp Further thoughts?

@melaniephilipp
Copy link

@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.)

@dylanb
Copy link
Contributor

dylanb commented Jan 9, 2023

looks like a false positive to me then

@WilcoFiers
Copy link
Contributor

I agree, axe-core should pass if the colors are identical. Good catch.

@WilcoFiers WilcoFiers added fix Bug fixes rules Issue or false result from an axe-core rule and removed ungroomed Ticket needs a maintainer to prioritize and label labels Jan 16, 2023
@WilcoFiers WilcoFiers added this to the Axe-core 4.7 milestone Jan 16, 2023
@melaniephilipp
Copy link

@WilcoFiers Thanks for the confirmation. Do you have an estimate of release timing to remove the false positive? Thanks!

@WilcoFiers WilcoFiers self-assigned this Jan 19, 2023
@WilcoFiers WilcoFiers added the pr A pr has been created for the issue label Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fixes pr A pr has been created for the issue rules Issue or false result from an axe-core rule
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants