This problem was introduced in axe-core 4.5. When an element is scrolled out of view, it is not included in the grid, which results (among other things) that it is reported as incomplete once its scrolled out of view.
Here's how to reproduce the problem. These logs should report the same, but the second one reports incomplete instead of a violations.
<h1 style="color: #ABC">Hello World</h1>
<main style="background: #CDF; height: 800px;"></main>
<script src="/axe.js"></script>
<script>
window.onload = async () => {
window.scrollTo(0, 0);
const res0 = await axe.run({ runOnly: 'color-contrast' })
console.log({ violations: res0.violations, incomplete: res0.incomplete })
window.scrollTo(0, 1000);
const res1 = await axe.run({ runOnly: 'color-contrast' })
console.log({ violations: res1.violations, incomplete: res1.incomplete })
}
</script>
This problem was introduced in axe-core 4.5. When an element is scrolled out of view, it is not included in the grid, which results (among other things) that it is reported as incomplete once its scrolled out of view.
Here's how to reproduce the problem. These logs should report the same, but the second one reports incomplete instead of a violations.