Skip to main content

Accessibility

Accessibility (A11y) means designing and developing software that is usable by everyone, including people with disabilities. It is not optional – it is essential. Accessibility improves usability, search engine optimization, legal compliance, and above all, equality.

This guide provides concrete best practices for developers, designers, and teams to build accessible software, based on the WCAG (Web Content Accessibility Guidelines) 2.2 standard, inclusive UX principles, and modern tooling.


πŸ“š Accessibility Principles​

Use the POUR framework from WCAG:

PrincipleDescription
PerceivableUsers must be able to perceive the information (e.g., alt text, color contrast, captions)
OperableUsers must be able to operate the interface at their own pace, without being limited by time constraints (e.g., no automatic timeouts, disappearing content, or time-limited form submissions).
UnderstandableContent must be clear and predictable (e.g., consistent navigation, error messages)
RobustMust work with a wide range of assistive technologies (e.g., screen readers, ARIA support)
βœ…

If your app follows POUR, it’s already around 90% accessible.


πŸ“ Key Rules from WCAG​

The WCAG 2.2 defines accessibility rules under the four POUR core principles. Below are the most essential rules every team should apply:

Perceivable​

RuleDescription
Provide text alternativesEvery image must have meaningful alt text or alt="" if decorative
Ensure sufficient contrastText must have a minimum contrast ratio of 4.5:1 (normal) or 3:1 (large text)
Don’t rely on color aloneUse icons, labels, or patterns in addition to color (e.g., for status indicators)
Provide captions and transcriptsVideos must have captions, audio must have transcripts
Responsive layoutContent must be readable and reflow on different screen sizes and zoom levels

Operable​

RuleDescription
Everything must be keyboard accessibleAll interactive elements must be usable via Tab, Enter, Space
Provide visible focus statesShow a clear visual indicator when an element is focused
Avoid keyboard trapsUsers must always be able to move in and out of modals or widgets using the keyboard
Use logical tab orderElements must follow a logical, intuitive tabbing sequence
Avoid flashing contentNo more than 3 flashes per second (prevents seizures)

Understandable​

RuleDescription
Use clear, consistent languageAvoid jargon, write labels and error messages clearly
Label all inputs properlyUse <label> elements and associate them with their form controls
Explain errors and how to fix themDon’t just show β€œInvalid” β€” explain what went wrong and how to correct it
Provide consistent navigationMenus and layout should not change unexpectedly between pages
Use heading hierarchyDo not skip heading levels (<h1> β†’ <h2> β†’ <h3>)
Warn before timeouts or destructive actionsInform users when an action is permanent or a session will expire

Robust​

RuleDescription
Use semantic HTMLUse proper elements (<button>, <nav>, <main>) for better screen reader support
Use ARIA only when necessaryPrefer native HTML before using ARIA roles
Ensure compatibility with assistive techTest with screen readers (e.g., NVDA, VoiceOver) and alternative input methods
Validate your HTMLBroken markup can prevent assistive tools from interpreting your page

Minimum WCAG Levels​

LevelMeaning
A (Minimum)Basic accessibility – not enough for modern standards
AA (Recommended) βœ…Industry standard – sufficient for most legal and usability requirements
AAA (Advanced)Highest level – ideal, but not always practical for all content types
βœ…

Aim for WCAG 2.2 Level AA as the minimum standard in every web project.


πŸ›  Developer Tools​

ToolIntegrationPurpose
axe-coreBrowser extension, GitHub Action, CLI, CI pipelines, FigmaIndustry-standard automated A11y testing
WAVEBrowser extensionWeb Evaluation Tool
eslint-plugin-jsx-a11yESLintLints JSX for accessibility issues
storybook-addon-a11yStorybookInstant feedback on component accessibility
cypress-axeCypressE2E tests with accessibility assertions
jest-axeJestUnit tests for accessibility violations
Pa11yCLI, CISite-wide accessibility reports

πŸ§ͺ Designer & Figma Tools​

ToolPurpose
axe-coreIndustry-standard automated A11y testing
StarkColor contrast checker, vision simulation
AbleColor vision simulator
ContrastQuick WCAG AA/AAA check in Figma

βš™οΈ DevOps / CI Integration​

  • Integrate axe-core or Pa11y into GitHub Actions, GitLab CI, or Jenkins to catch issues automatically in PRs.
  • Sample GitHub Action with axe:
- uses: dequelabs/axe-linter-action@v1
with:
api_key: ${{ secrets.AXE_LINTER_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}

βœ… Quick Checklist for Developers​

  • Use real <button> elements with clear, visible text or accessible aria-label.
  • Use real <a href=""> for all links that navigate – not <div> or <span>.
  • All interactive components (menus, modals, sliders) are fully keyboard accessible.
  • All buttons, inputs, links show a visible focus ring (never remove it!).
  • Use a clear heading structure: one <h1>, then logical levels (<h2>, <h3>, …).
  • All images have meaningful alt attributes, or alt="" if decorative.
  • Every form input has a visible <label>, and all fields are grouped logically.
  • Errors are explained in text, not just with color or icons.
  • Text and UI elements meet WCAG AA contrast (4.5:1 for body text, 3:1 for large).
  • Use semantic HTML elements (<nav>, <main>, <section>, <ul>, etc.).
  • Do not rely on color alone – always include text, icons, or shapes.
  • Animations should be subtle and non-distracting. If motion is used, ensure that users who prefer reduced motion can opt out through system settings.
  • All modals/dialogs are focus-trapped and closable with Esc.
  • No keyboard traps – users must always be able to navigate forward and back.
  • Use ARIA roles and attributes only when needed, and never to β€œfix” bad HTML.
  • Ensure responsive layout: zoomable, screen-reader friendly, mobile accessible.
  • Run automated tests with tools like axe-core, eslint-plugin-jsx-a11y, or Pa11y.
  • Test with a screen reader at least once (VoiceOver, NVDA, or TalkBack).

πŸ“– Learn More​

ResourceDescription
WCAG 2.2 GuidelinesThe official reference
WebAIMPractical, accessible web dev resources
Deque UniversityTraining and tools by creators of axe-core
MDN Accessibility DocsDeveloper-oriented docs
a11yproject.comCommunity-driven accessibility guide
Inclusive ComponentsComponent-level a11y design patterns
Can I Use - Accessibility FeaturesFeature support by browser/platform

πŸ“Œ Final Thoughts​

Accessibility is not a feature, it’s a baseline. Make it part of your design, code, review, and testing process – from day one.

β€œAccessibility is not about disability, it’s about universal usability.”