You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expectation: Complete color-contrast audit without erroring
Actual: Fails with an exception
TypeError: Cannot read properties of undefined (reading 'filter')
at Aa (https://cdnjs.cloudflare.com/ajax/libs/axe-core/4.3.3/axe.min.js:12:111917)
at Ca (https://cdnjs.cloudflare.com/ajax/libs/axe-core/4.3.3/axe.min.js:12:112362)
at _s (https://cdnjs.cloudflare.com/ajax/libs/axe-core/4.3.3/axe.min.js:12:284518)
at Os (https://cdnjs.cloudflare.com/ajax/libs/axe-core/4.3.3/axe.min.js:12:284648)
at Ps (https://cdnjs.cloudflare.com/ajax/libs/axe-core/4.3.3/axe.min.js:12:285349)
at Ls (https://cdnjs.cloudflare.com/ajax/libs/axe-core/4.3.3/axe.min.js:12:287359)
at Object.color-contrast-evaluate (https://cdnjs.cloudflare.com/ajax/libs/axe-core/4.3.3/axe.min.js:12:299707)
at mu.run (https://cdnjs.cloudflare.com/ajax/libs/axe-core/4.3.3/axe.min.js:12:323457)
at https://cdnjs.cloudflare.com/ajax/libs/axe-core/4.3.3/axe.min.js:12:326089
at c (https://cdnjs.cloudflare.com/ajax/libs/axe-core/4.3.3/axe.min.js:12:97607)
<html lang="en"><head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Lighthous Accessibility Failure</title>
<!-- <link rel="stylesheet" href="/assets/css/light.css"> -->
</head>
<body>
<style>
pre {
overflow-x: auto;
}
</style>
<pre><span>
x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
</span></pre>
<p style="color: lightgray">Low Contrast Text</p>
<script src="https://cdnjs.cloudflare.com/ajax/libs/axe-core/4.3.3/axe.min.js"></script></body></html>
Found the problem. It turns out that the grid logic didn't handle elements whose client rect (in this case all the xs) were smaller than the bounding rect. The client rect produced an L shape box, while the bounding box is the full rectangle of that L shape. So the grid only added information in the shape of an L but we tried to get the midpoint of the bounding rect which didn't exist in the scroll region grid.
Validated with the latest axe-core-develop branch code base,
not seeing any erroring messages/exceptions, getting only complete audit results for color-contrast failure.
Product: axe-core
Expectation: Complete color-contrast audit without erroring
Actual: Fails with an exception
which resolves to these lines
axe-core/lib/commons/dom/get-rect-stack.js
Lines 478 to 479 in 1ee88cb
Reproduction Details
https://travisdowns.github.io/misc/sorting.html
Motivation: Lighthouse accessibility category to not error (originally filed at GoogleChrome/lighthouse#13118)
The text was updated successfully, but these errors were encountered: