Skip to content

Instantly share code, notes, and snippets.

@msichterman
Last active March 10, 2023 16:59
Show Gist options
  • Save msichterman/9a98c75f1fd4143c77fba1906aefc9de to your computer and use it in GitHub Desktop.
Save msichterman/9a98c75f1fd4143c77fba1906aefc9de to your computer and use it in GitHub Desktop.
How to add Axe A11Y Testing to Dev Workflow
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