You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to figure out why Pa11y is reporting a color contrast issue.
I have the axe browser extension installed and it's not reporting any problems. Neither is Wave or a Lighthouse accessibility audit.
Expected behaviour
No color contrast issue should be reported. I thought maybe it was the stack of coins on the right, but the color ratio around there is ~6.66:1 according to WebAIM.
Actual behaviour
Pa11y reports a color contrast issue:
{documentTitle: 'Page',pageUrl: 'http://localhost:3000/',issues: [{code: 'color-contrast',type: 'error',typeCode: 1,message: 'Elements must meet minimum color contrast ratio thresholds (https://dequeuniversity.com/rules/axe/4.8/color-contrast?application=axeAPI)',context: '<div class="inner">\n Lorem ipsum dolor sit am...</div>',selector: 'html > body > div > div',runner: 'axe',runnerExtras: {description: 'Ensures the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds',impact: 'serious',help: 'Elements must meet minimum color contrast ratio thresholds',helpUrl: 'https://dequeuniversity.com/rules/axe/4.8/color-contrast?application=axeAPI'}}]}
In some cases, when axe can’t determine the contrast ratio for certain elements... it will report the issue as “needs review”. The problem is that pa11y is currently reporting these review items as errors.
We've started work on fixing this and will return to it soon. As I progressed, I realised it needed a bit more thought regarding versioning. Just need to bring a few other Pa11y projects up-to-date first, and Pa11y itself to the latest Puppeteer version.
Here's the PR where the work will happen, if you'd like to track it:
Hi,
I'm trying to figure out why Pa11y is reporting a color contrast issue.
I have the axe browser extension installed and it's not reporting any problems. Neither is Wave or a Lighthouse accessibility audit.
Expected behaviour
No color contrast issue should be reported. I thought maybe it was the stack of coins on the right, but the color ratio around there is ~6.66:1 according to WebAIM.
Actual behaviour
Pa11y reports a color contrast issue:
Steps to reproduce
I created a reproduction repo at https://github.com/simshaun/color-contrast-false-positive
Clone and start the server with
npm run serve
.Test with pa11y:
npm run pa11y
Environment
The text was updated successfully, but these errors were encountered: