Skip to content

Commit 0dcfed0

Browse files
committed
Disabling color-contrast checking
- axe-core audit uses scrollIntoView() in color checking, which moves the viewport to the bottom of the page on load.
1 parent 6b07e8e commit 0dcfed0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/auditor.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@ import { axe } from "axe-core/axe.min.js";
22
import report from "./reporter";
33

44
export default function () {
5-
window.axe.a11yCheck(document, {}, (results) => {
5+
const options = {
6+
"rules": {
7+
"color-contrast": { enabled: false },
8+
}
9+
};
10+
11+
window.axe.a11yCheck(document, options, (results) => {
612
report(results);
713
});
814
}

0 commit comments

Comments
 (0)