Accessibility in React: A Practical Guide

Sarah Jenkins
•
April 7, 2026
•
5 min read
•
150 views

Accessibility in React: A Practical Guide

Building accessible React applications isn't just about compliance -- it's about creating products that everyone can use.

Why Accessibility Matters

  • Over 1 billion people worldwide have disabilities
  • Accessible design often benefits all users
  • Legal requirements in many jurisdictions

Core Principles

1. Semantic HTML

// Bad
<div onClick={handleClick}>Click me</div>

// Good
<button onClick={handleClick}>Click me</button>

2. ARIA Labels

<button aria-label="Close modal" onClick={onClose}>
    <CloseIcon />
</button>

3. Focus Management

useEffect(() => {
    if (isOpen) {
        modalRef.current?.focus();
    }
}, [isOpen]);

Testing for Accessibility

  • Use eslint-plugin-jsx-a11y
  • Test with screen readers
  • Use keyboard navigation exclusively
  • Run automated audits with axe-core

Conclusion

Accessibility should be baked into your development process, not bolted on at the end.

Sarah Jenkins

Sarah Jenkins

Sarah has over 15 years of experience building distributed systems. She is passionate about clean code, domain-driven design, and mentoring the next generation of engineers.