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

Check contrast of CSS ::highlight pseudo classes #4553

Open
WilcoFiers opened this issue Aug 5, 2024 · 0 comments
Open

Check contrast of CSS ::highlight pseudo classes #4553

WilcoFiers opened this issue Aug 5, 2024 · 0 comments
Labels
color contrast Color contrast issues rules Issue or false result from an axe-core rule standards Issues in the ARIA standards objects (lib/standards)

Comments

@WilcoFiers
Copy link
Contributor

It's possible to use ::highlight() in CSS to change the foreground and background colors of text. Axe-core should look at this when testing, since it can result both in false positives and false negatives.

I've never seen anyone use this, so it's mostly a theoretical problem. Here's a codepen with how that might work:
https://codepen.io/wilcofiers/pen/xxorwOe

@WilcoFiers WilcoFiers added rules Issue or false result from an axe-core rule color contrast Color contrast issues standards Issues in the ARIA standards objects (lib/standards) labels Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
color contrast Color contrast issues rules Issue or false result from an axe-core rule standards Issues in the ARIA standards objects (lib/standards)
Projects
None yet
Development

No branches or pull requests

1 participant