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

pa11y can't deal with transparent background (rgba) #442

Closed
brentguf opened this issue Jan 15, 2019 · 8 comments
Closed

pa11y can't deal with transparent background (rgba) #442

brentguf opened this issue Jan 15, 2019 · 8 comments

Comments

@brentguf
Copy link

Hi,

pa11y reports contrast ratio violations whenever we have text on a transparant background color, using an rgba value to determine this background color. It can't seem to deal with colors that have an alpha value of <1.

This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio
of 1:1. Recommendation: change text colour to #fefeff.

Could you add the possibility to have transparent backgrounds and still pass this test?

Thanks!

@brendaneross
Copy link

Seconding this, and improve the contrast message by outputting which two colors are being compared.

@brendaneross
Copy link

Also, the color conversions need to be updated to allow for 8-digit hex codes.

@joeyciechanowicz
Copy link
Member

Pa11y doesn't itself run the accessbility tests, those are handled by HTML Code Sniffer. We've recently updated the version of HTML-CS used, which may have fixed the issue. However we are yet to publisha new version.

@skudrua2019
Copy link

Pa11y doesn't itself run the accessbility tests, those are handled by HTML Code Sniffer. We've recently updated the version of HTML-CS used, which may have fixed the issue. However we are yet to publisha new version.

Hi, could you clarify what exactly version of HTML code-sniffer is Pa11y using? And does his version support WCAG2.1?

@josebolos
Copy link
Member

Hi @skudrua2019,

Pa11y is currently using the latest published version of the html_codesniffer npm module (v2.4.1) which, as far as I know, still doesn't include support for WCAG 2.1 rules.

@skudrua2019
Copy link

skudrua2019 commented Apr 9, 2020 via email

@Ruluk
Copy link
Contributor

Ruluk commented Apr 15, 2020

Hello! From my tests, it seems that Axe handles transparency correctly in color contrast evaluation. In the last version, Pa11y supports the Axe runner, so you should give it a try.

@josebolos
Copy link
Member

As discussed previously, pa11y offers two reporters (HTML_CodeSniffer and axe) and we're at the mercy of what issues they can detect, so this is something that unfortunately we won't be able to fix ourselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants