axe-core-npm
axe-core-npm copied to clipboard
Axe issues reported only on first page rendering but no more after page navigation
Axe issues reported only on first page rendering but no more after page navigation version "next": "12.0.7", "@axe-core/react": "^4.4.0", "react": "^17.0.2", node:16-bullseye-slim
Expectation: Axe issues reported only on first page rendering but no more after page navigation
I configure in _app.tsx const isServerSideRendered = () => { return typeof window === 'undefined'; };
if (process.env.NODE_ENV !== 'production' && !isServerSideRendered()) { import('react-dom').then(ReactDOM => { import('@axe-core/react').then(axe => { axe.default(React, ReactDOM, 1000, {}); }); }); } It works for the first rendering but not for the second exactly as described in https://github.com/dequelabs/axe-core-npm/pull/437 but despite the correction in 4.4.0 still have the problem.