Last active
March 10, 2023 16:59
-
-
Save msichterman/9a98c75f1fd4143c77fba1906aefc9de to your computer and use it in GitHub Desktop.
How to add Axe A11Y Testing to Dev Workflow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (process.env.NODE_ENV !== "production" && !isServerSideRendered()) { | |
const axeConfig = { | |
rules: [], | |
}; | |
import("react-dom").then((ReactDOM) => { | |
import("@axe-core/react").then((axe) => { | |
axe.default(React, ReactDOM, 1000, axeConfig); | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment