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

r69 reports subminimum contrast of elements with sufficient contrast #1582

Open
poolcvs opened this issue Feb 24, 2024 · 2 comments
Open

r69 reports subminimum contrast of elements with sufficient contrast #1582

poolcvs opened this issue Feb 24, 2024 · 2 comments
Labels
bug Report of unexpected or faulty behaviour in Alfa

Comments

@poolcvs
Copy link

poolcvs commented Feb 24, 2024

On https://www.caremark.com/ r69 reports 36 failures, but at least some of the reported elements have sufficient contrast. The first reported failure is the SPAN containing “Worried about drug shortages?”, which has color #fff on background #c00. The fourth reported failure is an H2 containing “Getting your medication”, which has color #000 on background #f5f5f5. This second example also passes AAA, but fails r66.

@poolcvs poolcvs added the bug Report of unexpected or faulty behaviour in Alfa label Feb 24, 2024
@Jym77
Copy link
Contributor

Jym77 commented Feb 26, 2024

Thanks for the report
🤔 when running the extension (currently with Alfa version 0.67.0), I only see 11 errors for R66 (1.4.6) and none for R69, and for the "Worried about drug shortage?" text, Alfa correctly gets the #fff and #c00 colors.
When running directly Alfa locally (version 0.74.0 plus some extra changes), I get similar results (no R69 error flagged).

Which version of Alfa are you running?

You can also investigate in more details with something like

const outcomes = Audit.of();

const target = Sequence.from(outcomes)
   .find(outcome => outcome.uri === 'https://alfa.siteimprove.com/rules/sia-r69' && 
                    outcome.target.data.includes("Worried about drug shortages?");

console.dir(target.toJSON(), {depth: null });

This should show you the foreground and background colors found by Alfa (in RGB percentages) which you can compare to the actual values.

@poolcvs
Copy link
Author

poolcvs commented Feb 26, 2024

The version of alfa-playwright is 0.64.8, but its dependencies have version 0.74.0. Thank you for the suggestion for investigation. I shall try that. However, I now notice that these reports are classified as cantTell, not as failures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Report of unexpected or faulty behaviour in Alfa
Projects
None yet
Development

No branches or pull requests

2 participants