Skip to content

movntains/web-accessibility-cheatsheet

Repository files navigation

Web Accessibility Cheatsheet

⚠️This is currently a work in progress. More topics are continually being added.

Web accessibility is a vast and multi-faceted topic, so it can be easy to feel overwhelmed when you’re trying to learn how to build accessible websites. With that in mind, I've created this cheatsheet as a way to share what I've learned over years of studying accessibility and building accessible websites and web apps.

I'll do my best to explain things in plain English, since anyone who's looked at the Web Content Accessibility Guidelines (WCAG) knows that parsing the documentation can sometimes be difficult.

I'll also include some full code examples that will hopefully be helpful, and will be as framework-agnostic as possible (although, some of the examples will intentionally be specific to frameworks like Vue or React).

If you're completely new to web accessibility, feel free to follow the suggested reading order. Otherwise, you can peruse the list of topics.

Suggested Reading Order for Accessibility Newcomers

  1. Web accessibility foundations
  2. Semantics
  3. Headings and landmarks
  4. Inclusive design
  5. Interactivity
  6. Animation and motion

List of Topics

Topic What's Covered
Animation and motion
  • WCAG success criteria for motion
  • Implementing prefers-reduced-motion
Common accessibility anti-patterns
Headings and landmarks
  • Outlining the page
  • Heading levels
  • Aiding navigation with landmarks
  • Page regions
Inclusive design
  • Key aspects
  • Touch targets
  • Color and contrast
  • Responsive design
  • Content reordering
  • Styling focus states
Interactivity
  • Focus and tab order
  • Logical DOM order
  • Visibility of offscreen content
  • Semantic HTML elements with free keyboard support
  • Use a <button>, not a <div>
  • Links vs. buttons
  • Controlling focus with tabindex
  • Bypassing repetitive content with skip links
Semantics
  • Affordances and semantics
  • Semantic HTML
  • Semantic properties
  • The accessibility tree
Web accessibility foundations
  • Digital accessibility
  • Why web accessibility is important
  • Language and definitions of accessibility

About

A collection of notes and code examples for web accessibility

Topics

Resources

Stars

Watchers

Forks

Contributors