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 does not report an issue when text is the same colour as its background #4271

Closed
1 task done
helenb opened this issue Dec 12, 2023 · 4 comments
Closed
1 task done
Labels
extension Axe Firefox or Chrome extension issues ungroomed Ticket needs a maintainer to prioritize and label

Comments

@helenb
Copy link

helenb commented Dec 12, 2023

Product

axe Extension

Product Version

4.70.0

Latest Version

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

Issue Description

Expectation

Given this code snippet

<div style="background-color:blue; font-size:30px">
  <p style="color:blue;">test</p>
</div>

I would expect Axe to report an issue with the colour contrast, but it does not. Running pa11y on the command line with the same snippet and --standard WCAG2AA I see the following: Error: This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 3:1, but text in this element has a contrast ratio of 1:1. Recommendation: change text colour to #fff.

Actual

Fails to report an issue with the colour contrast.

How to Reproduce

Use the debug view for this codepen snippet and run the axe browser extension in chrome against it, with ': https://codepen.io/helenc/pen/MWLROZQ

Additional context

I have ticked 'latest version' above because I assume the browser extension automatically updates.

Screenshot of the results on the codepen above:
Screenshot 2023-12-12 at 08 55 19

@helenb helenb added the ungroomed Ticket needs a maintainer to prioritize and label label Dec 12, 2023
@github-actions github-actions bot added the extension Axe Firefox or Chrome extension issues label Dec 12, 2023
@straker
Copy link
Contributor

straker commented Dec 12, 2023

Thanks for the issue. This is intentional as a 1:1 contrast ratio is effectively hidden text, so axe-core treats it as it does any other hidden text and ignores it. Axe reports it as needs review just in case you didn't mean to hide it this way.

@straker straker closed this as completed Dec 12, 2023
@helenb
Copy link
Author

helenb commented Dec 12, 2023

Hi @straker, thanks for the quick response. Where can I find any items that need review? - I can't see the option in my screenshot above.

@schne324
Copy link
Member

schne324 commented Dec 12, 2023

@helenb In the extension, "Needs review options" are available to pro users only at the moment. I do realize that this is causing problems for some users so we have plans to change that in the very near future. Soon, all you'll have to do is login (not upgrade to pro or anything) and these settings will become available (even non-pro users).

Screenshot of axe DevTools extension settings showing needs review options as a PRO feature

@helenb
Copy link
Author

helenb commented Dec 13, 2023

Thanks for your help @schne324 - that makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension Axe Firefox or Chrome extension issues ungroomed Ticket needs a maintainer to prioritize and label
Projects
None yet
Development

No branches or pull requests

3 participants