Skip to content

Avoid duplicates between color-contrast and color-contrast-enhanced #3612

@WilcoFiers

Description

@WilcoFiers

Product

axe-core

Feature Description

Currently the color-contrast-enhanced rule fails nodes that also fail the color-contrast rule. This creates duplicates when both rules are on. This isn't ideal. A better solution would be to pass nodes that are below the contrast threshold of color-contrast.

There are already options available in color-contrast-evaluate to do this. We should add caching to this evaluate method to avoid calculating the contrast of a node more than once though, since this is a fairly slow operation.

Metadata

Metadata

Assignees

Labels

color contrastColor contrast issuesperformancePerformance related issuesprA pr has been created for the issuerulesIssue or false result from an axe-core rule

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions