Skip to content

color-contrast check: getImageData fails with value is not of type long #3918

@mattzeunert

Description

@mattzeunert

Product

axe-core

Product Version

4.6.3

Latest Version

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

Issue Description

Expectation

Run an accessibility audit without errors.

Actual

Getting this error:

"TypeError: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': Value is not of type 'long'. - feature unsupported in your environment. Skipping color-contrast rule."

How to Reproduce

  1. Go to https://simpletire.com/
  2. Paste axe-min code
  3. Run this code:
axe
  .run()
  .then(results => {
    if (results.violations.length) {
        console.log(results.incomplete.find(item => item.id === "color-contrast"))
    }
  })

Additional context

Width is zero / font size is infinity. Maybe because the custom font can't be found?

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