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

Support for "prefers-color-scheme" #278

Open
alexiscott opened this issue Mar 26, 2020 · 0 comments
Open

Support for "prefers-color-scheme" #278

alexiscott opened this issue Mar 26, 2020 · 0 comments

Comments

@alexiscott
Copy link

HTML code sniffer, which is what PA11y uses for these rules, does not appear to support the CSS @media rule: @media (prefers-color-scheme: dark) {}

More details here: https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme

This means that when pally-ci runs it's tests, it does not see the any non-compliant CSS. An example might be:



<style>
 @media (prefers-color-scheme: dark) {
   .prefers {
     background: black;
     color: black;
   }
 }
</style>

<div class="prefers">
  I "prefer" a black background, and black text, that nobody can read!
</div>

Is this a feature that will be added to pa11y?

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

No branches or pull requests

2 participants