European Accessibility Act
EAA compliance for Gatsby: WCAG 2.1 AA checklist & fixes
Gatsby produces static HTML at build time, which is a head start for accessibility. The Gatsby-specific traps live in the @reach/router-driven client navigation and the gatsby-plugin-image alt-text discipline. Static-site generator built on React; common for marketing and documentation sites.
- Category
- Web framework
- Standard
- WCAG 2.1 Level AA via EN 301 549
- Deadline
- 28 June 2025 (EU consumer services)
- Risk for B2C
- High — public-facing, consumer-billed
What the EAA actually requires from a Gatsby site
Gatsby generates static HTML at build time, so under the EAA it has a head start and the obligation narrows to its React-driven client navigation and image discipline. EN 301 549 conformance forces you to add focus management to @reach/router-based gatsby-link navigation, which does not move focus to main, and to enforce the alt prop on GatsbyImage, which is TypeScript-optional and defaults to undefined so screen readers announce the file name. The built static output is otherwise accessible, so the requirement is essentially route-focus handling and alt-text enforcement.
Gatsby is common for marketing and documentation sites, so in-scope Gatsby sites are usually content or brochure surfaces for businesses of varying size, with fine exposure tracking the operator. A small business faces fixed national penalties, while a larger company's Gatsby marketing or commerce site could reach turnover-percentage territory. A practical, forward-looking consideration is that Gatsby's ecosystem momentum has slowed relative to Astro and Next.js, so for existing sites the pragmatic path is to fix the two unique risks rather than migrate for accessibility reasons alone.
Remediation is a developer change in the codebase: a layout wrapper that focuses main on every @reach/router location change, and making the GatsbyImage alt prop required through linter configuration and code review. Add gatsby-plugin-react-axe in development and run scans against the built static output rather than the dev server. Because the framework-specific surface is small, a single developer can close these gaps in a short, well-scoped effort.
Top WCAG failures we see on Gatsby sites
Across hundreds of Gatsby scans, the same handful of issues show up over and over. None of them require ripping the theme apart — most are fixable in a few hours by someone comfortable in the platform's editor or template files.
Client-side navigation without focus management
gatsby-link does not move focus to <main>.
2.4.3GatsbyImage alt prop omitted
TypeScript-optional alt allows shipping images without descriptions.
1.1.1
Concrete code fixes for Gatsby
Below are copy-paste fixes for the most common Gatsby issues. They assume you have access to your theme code or the platform's custom-code injection panel. If you cannot edit code directly, share these snippets with whoever maintains the site — every one of them is a ten-minute change.
Wrap layout to focus main on route change
import { useEffect } from 'react';
import { useLocation } from '@reach/router';
export function FocusOnNav() {
const location = useLocation();
useEffect(() => {
const main = document.querySelector('main');
if (main instanceof HTMLElement) {
main.setAttribute('tabindex', '-1');
main.focus();
}
}, [location.pathname]);
return null;
}Same pattern as Next.js / Vue / Angular: move focus on every navigation.
Tools and plugins worth installing first
gatsby-plugin-react-axe in development
How to scan a Gatsby site without missing anything
Automated scanners catch about 30–40% of WCAG issues; the rest need manual review. The good news is that the 30–40% includes the most expensive issues to remediate after the fact, so an automated scan is the cheapest way to get unstuck. Run one before you change a line of theme code.
Run on the built static output, not the dev server.
Run a free public scan against any Gatsby URL right now — no signup, results in 60 seconds.
Frequently asked questions
Is Gatsby still a good choice for accessible documentation sites?
Gatsby is stable for documentation and content sites. Its static output is accessible by default. The main concern for new projects is that Gatsby's ecosystem growth has slowed relative to Astro and Next.js. For existing Gatsby sites, the focus management fix above addresses the primary unique risk, and the core accessibility work is the same as any React project.
Does gatsby-plugin-image require alt text?
gatsby-plugin-image's GatsbyImage component accepts an optional alt prop. Without it, the prop defaults to undefined — which most browsers treat as no alt attribute, meaning screen readers announce the image file name. Make alt a required field in your linter configuration and in code review checklists to prevent shipping images without descriptions.
Other web framework platforms
EAA compliance for Next.js
The dominant React meta-framework for production sites; chosen by Stripe, Notion, TikTok,
EAA compliance for React
The most-used UI library; the foundation of Next.js, Remix, and most modern SPAs.
EAA compliance for Vue.js
Top 3 frontend framework; common in SMB and education sites across Europe.
EAA compliance for Angular
Enterprise default in many EU public-sector portals; subject to EAA and EN 301 549.
All EAA platform guides
Shopify, WordPress, Next.js, Webflow and more
Complete WCAG 2.1 guide
POUR principles, conformance levels, legal requirements
How-to fix recipes
Copy-paste fixes for the most common WCAG failures
Find every accessibility issue on your site in 60 seconds.
Free public scan. No card. AI-generated fixes for every issue we find.