Skip to content

Graceful handling of color contrast check fails for oklch and oklab with none #4894

@pattonwebz

Description

@pattonwebz

Product

axe-core

Product Version

4.10.3

Latest Version

  • I have tested the issue with the latest version of the product

Issue Description

Expectation

Color contrast checks return results for issues on the page, or partial results in event of an error with a specific color.

Actual

Color contrast checks return an error with no results.

How to Reproduce

A page with CSS like this produces the issue: oklch(0.961073 0.000047911 none / 0.2)

Additional context

It seems the source of this is ColorJS treats none as NaN in the version used in axe-core. They have a beta that resolves this in the v6 line that handles none and NaN properly so those colors don't fail.

Related issue:
#4269

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions