← Back to all articles

The Ultimate Web Accessibility (a11y) Checklist

August 14, 2026By Kazi Samiul Haque Adrik

Why Accessibility Matters

Web Accessibility, commonly abbreviated as a11y (because there are 11 letters between 'a' and 'y'), is the practice of ensuring your website is usable by everyone, regardless of their physical or cognitive abilities.

Accessibility is no longer an afterthought. In many countries, it is a strict legal requirement for commercial websites, with major lawsuits targeting non-compliant businesses. Beyond legal compliance, building accessible websites improves SEO, increases your audience reach, and is simply the right thing to do.

Here is the ultimate developer checklist for auditing and fixing your React and Next.js applications for modern accessibility standards.

1. Semantic HTML is the Foundation

The most common mistake React developers make is building everything out of <div> tags. Screen readers (software used by visually impaired users to read web pages aloud) rely heavily on semantic HTML to navigate a site.

  • Rule: Never use a <div onClick={...}> to create a button. Use a native <button> tag. Buttons are automatically focusable via the keyboard and can be activated with the Enter or Space key.
  • Rule: Ensure your page has exactly one <h1> tag representing the main topic.
  • Rule: Use <nav> for navigation links, <main> for primary content, and <article> for blog posts.

2. Keyboard Navigation

Users with motor disabilities often cannot use a mouse and rely entirely on the keyboard (specifically the Tab key) to navigate your site.

  • Test it yourself: Unplug your mouse. Can you navigate your entire website, fill out forms, and close modals using only the Tab, Shift+Tab, Enter, and Escape keys?
  • Rule: Never remove outline styles globally (outline: none). If you hate the default browser focus ring, replace it with a custom one (:focus-visible { outline: 2px solid blue; }).
  • Rule: If you build a custom modal, ensure you "trap" the focus inside the modal while it is open, and return focus to the trigger button when it closes.

3. ARIA Labels and Roles

ARIA (Accessible Rich Internet Applications) attributes are HTML properties that provide extra context to screen readers when native HTML isn't enough.

  • Rule: If an icon button has no text (e.g., a magnifying glass icon for search), it MUST have an aria-label.
<button aria-label="Search the website">
  <svg>...</svg>
</button>
  • Rule: First Rule of ARIA: No ARIA is better than bad ARIA. Always prefer native HTML tags over injecting role="button" onto a div.

4. Color Contrast and Visuals

Visual accessibility affects the largest portion of your users, including those with color blindness or age-related vision decline.

  • Rule: Ensure all text has a contrast ratio of at least 4.5:1 against its background. You can check this using Chrome DevTools or plugins like WebAIM.
  • Rule: Never use color alone to convey information. If a form input is invalid, don't just turn the border red. Add an error icon and a text description below it.

5. Managing Focus in Single Page Applications (SPAs)

In traditional websites, clicking a link loads a new page, and the screen reader announces the new page title. In a React SPA, the page content swaps dynamically without a hard refresh. The screen reader remains silent, leaving the user completely lost.

  • Rule: When a route changes in a React app, you must manually manage focus. The best practice is to automatically move focus to the new <h1> tag or a visually hidden "Skip to main content" link. Next.js handles route announcements internally, but custom CSR apps require manual management.

Conclusion

Building accessible web applications requires empathy and discipline. By writing semantic HTML, testing with your keyboard, and checking your color contrasts, you not only protect your clients from lawsuits but create a better, more inclusive web for everyone.

Available for projects
Bangladesh
SSC '26 Grad