React / Next.js guide
WCAG 2.2 AA engineering checklist for React and Next.js apps
Eliminate clickable divs, broken landmarks, and contrast regressions in React components before deploying.
2 fixes · Written for React / Next.js
- 1
nested-interactive
WCAG 4.1.2 Name, Role, ValueClickable card divs wrap buttons or links, breaking keyboard focus and screen readers.
The fix
// Avoid clickable <div onClick={...}> // Use a semantic <button type="button"> or Next.js <Link> with focus-visible styles <button type="button" onClick={openModal} className="focus-visible:outline-2 focus-visible:outline-offset-2"> View compliance details </button> - 2
landmark-one-main
WCAG 1.3.1 LandmarksLayouts omit a <main> landmark or skip-to-content link.
The fix
<a href="#main-content" className="sr-only focus:not-sr-only">Skip to main content</a> <main id="main-content">{children}</main>
Free scan, free account
Scan your React / Next.js site automatically.
Scan free, then sign in with a free account to get every failing selector plus an agent-ready export with fix guidance.
Run a free scan