Avoid duplicates between color-contrast and color-contrast-enhanced #3612
Labels
color contrast
Color contrast issues
performance
Performance related issues
pr
A pr has been created for the issue
rules
Issue or false result from an axe-core rule
Milestone
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.
The text was updated successfully, but these errors were encountered: