Skip to content

Check contrast of CSS ::highlight pseudo classes #4553

Open
@WilcoFiers

Description

@WilcoFiers

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    color contrastColor contrast issuesrulesIssue or false result from an axe-core rulestandardsIssues in the ARIA standards objects (lib/standards)

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions