Skip to content

Color-contrast errors out on CSS color spaces in text-shadow #4080

@WilcoFiers

Description

@WilcoFiers

This results in an incomplete result from axe-core:

<h2 style="color: #ccc; text-shadow: 
  3px 3px oklch(60% 0.57 181),
  0px 3px oklch(60% 0.57 181),
  0px -3px oklch(60% 0.57 181),
  3px 0px oklch(60% 0.57 181),
  -3px 0px oklch(60% 0.57 181),
  -3px -3px oklch(60% 0.57 181);
">Hello world</h2>

This is the error:

Error: Unable to process text-shadows: oklch(0.6 0.57 181) 3px 3px 0px, oklch(0.6 0.57 181) 0px 3px 0px, oklch(0.6 0.57 181) 0px -3px 0px, oklch(0.6 0.57 181) 3px 0px 0px, oklch(0.6 0.57 181) -3px 0px 0px, oklch(0.6 0.57 181) -3px -3px 0px

A little while back we fixed this problem with use of color and background-color, but it seems we missed something on text-shadow. Might be good to go over the rest of the color commons, see if we missed anything else too.

Metadata

Metadata

Assignees

Labels

color contrastColor contrast issuescommonsIssues in the common code (lib/commons)fixBug fixesprA pr has been created for the issue

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