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

false positive contrast ratio #4675

Closed
1 task done
matti opened this issue Jan 21, 2025 · 4 comments
Closed
1 task done

false positive contrast ratio #4675

matti opened this issue Jan 21, 2025 · 4 comments
Labels
ungroomed Ticket needs a maintainer to prioritize and label

Comments

@matti
Copy link

matti commented Jan 21, 2025

Product

axe-core

Product Version

No response

Latest Version

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

Issue Description

Expectation

not false positive

Actual

false positive

How to Reproduce

https://www.kaalimato.com/catalog/Miehet+avautuvat+suorituspaineistaan_a_5816.html

has this button

Image

which has background #009450

so

Image

it's 3.92:1 which is above 3:1, so given that the calculated contrast ratio is 3.92:1, the button does meet the contrast requirements

Additional context

@matti matti added the ungroomed Ticket needs a maintainer to prioritize and label label Jan 21, 2025
@benjaminhr
Copy link

+1

@dylanb
Copy link
Contributor

dylanb commented Jan 21, 2025

You need to provide font weight and font size in order to determine whether it passes because 4.5:1 is required for small text.

Also, when I run axe DevTools on that page, I don't get an issue with that button

@dylanb dylanb closed this as completed Jan 21, 2025
@WilcoFiers
Copy link
Contributor

Axe is reporting this as needing manual review, not as a violation. The reason axe cannot test this is because axe can only test contrast in situations where it can reliably detect a background. Because the text node of this sticks out the top and bottom of the button a little axe cannot be sure whether there is a solid background or not.

@dylanb
Copy link
Contributor

dylanb commented Jan 23, 2025

yes, and when it does overlap, there IS a color contrast problem as can clearly be seen in the screenshot

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

No branches or pull requests

4 participants