Skip to content

Be less conservative with pseudo elements and contrast #3093

@WilcoFiers

Description

@WilcoFiers

Marking any text near a pseudo element with a background for review has introduced a lot of noise in the axe-core results. I think in part this is because we're not considering the size of the pseudo elements. If a pseudo element is a 10x10 pixel element, if it's behind a 400x100 pixel sized paragraph, the impact on it isn't going to be significant.

I would like us to add a threshold to the color-contrast rule. If we can work out the size of the pseudo element, and it is no more than 50% the area of the of the text it is near, the pseudo element should be ignored.

Metadata

Metadata

Assignees

Labels

color contrastColor contrast issuesfixBug fixesprA pr has been created for the issue

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions