Skip to main content
Accessibility Testing·Lesson 1 of 5

Accessibility Fundamentals

Accessibility (often abbreviated as a11y) is the practice of making digital products usable by everyone, including people with disabilities. As a tester, your role is to verify that applications work for all users, regardless of how they interact with technology.

Why Accessibility Matters

Over 1 billion people worldwide live with some form of disability. That is roughly 15% of the global population. When software is not accessible, these users are excluded.

Disability TypeExamplesHow Users Interact
VisualBlindness, low vision, color blindnessScreen readers, magnifiers
AuditoryDeafness, hard of hearingCaptions, transcripts
MotorLimited dexterity, paralysisKeyboard, switch devices
CognitiveDyslexia, ADHD, memory impairmentsSimple layouts, clear language

The Business Case

Accessibility is not just the right thing to do -- it makes business sense:

  • Legal compliance -- ADA, Section 508, European Accessibility Act
  • Larger audience -- 15% of potential users have disabilities
  • Better SEO -- Accessible sites rank higher in search results
  • Improved UX -- Accessible design benefits everyone (curb-cut effect)

The POUR Principles

The Web Content Accessibility Guidelines (WCAG) are built on four principles known as POUR:

Perceivable

Users must be able to perceive the information presented.

<!-- Bad: Image without alt text -->
<img src="chart.png" />

<!-- Good: Descriptive alt text -->
<img src="chart.png" alt="Bar chart showing Q3 revenue increased 25% over Q2" />

<!-- Good: Decorative image marked as such -->
<img src="decorative-border.png" alt="" role="presentation" />

Operable

Users must be able to operate the interface.

<!-- Bad: Click handler on a div (not keyboard accessible) -->
<div onclick="submitForm()">Submit</div>

<!-- Good: Native button element -->
<button type="submit">Submit</button>

<!-- Good: If you must use a div, add keyboard support -->
<div
  role="button"
  tabindex="0"
  onclick="submitForm()"
  onkeydown="if(event.key= 'Enter' || event.key= ' ') submitForm()"
>
  Submit
</div>

Understandable

Content and interface behavior must be understandable.

<!-- Bad: Unclear error message -->
<span class="error">Error</span>

<!-- Good: Descriptive error linked to input -->
<label for="email">Email address</label>
<input
  type="email"
  id="email"
  aria-describedby="email-error"
  aria-invalid="true"
/>
<span id="email-error" class="error" role="alert">
  Please enter a valid email address (e.g., name@example.com)
</span>

Robust

Content must be compatible with current and future assistive technologies.

<!-- Bad: Custom widget without ARIA -->
<div class="dropdown">
  <div class="dropdown-trigger">Select option</div>
  <div class="dropdown-menu">
    <div class="dropdown-item">Option 1</div>
    <div class="dropdown-item">Option 2</div>
  </div>
</div>

<!-- Good: Proper ARIA roles and states -->
<div class="dropdown">
  <button
    aria-haspopup="listbox"
    aria-expanded="false"
    aria-labelledby="dropdown-label"
  >
    Select option
  </button>
  <ul role="listbox" aria-labelledby="dropdown-label">
    <li role="option" aria-selected="false">Option 1</li>
    <li role="option" aria-selected="false">Option 2</li>
  </ul>
</div>

Types of Disabilities to Consider

Visual Impairments

Testing considerations:
- Screen reader compatibility (VoiceOver, NVDA, JAWS)
- Sufficient color contrast (4.5:1 for normal text, 3:1 for large text)
- Resizable text up to 200% without loss of functionality
- No information conveyed by color alone

Motor Impairments

Testing considerations:
- Full keyboard navigation (Tab, Enter, Space, Arrow keys, Escape)
- No time-dependent interactions (or adjustable timers)
- Large enough click/touch targets (minimum 44x44 pixels)
- No complex gestures required (pinch, multi-finger swipe)

Auditory Impairments

Testing considerations:
- Captions for all video content
- Transcripts for audio content
- Visual alternatives to audio alerts
- No audio-only information

Cognitive Impairments

Testing considerations:
- Clear, simple language
- Consistent navigation patterns
- Error prevention and recovery
- Minimal distractions (animations, autoplay)

Quick Accessibility Audit

You can start testing accessibility right now with these checks:

5-Minute Accessibility Checklist:

[ ] Navigate the entire page using only the keyboard (Tab key)
    - Can you reach every interactive element?
    - Can you see where the focus is?
    - Can you operate all controls?

[ ] Check color contrast
    - Use Chrome DevTools > Rendering > Emulate vision deficiencies
    - Or use the WebAIM contrast checker

[ ] Check images
    - Do all meaningful images have alt text?
    - Are decorative images hidden from screen readers?

[ ] Check headings
    - Is there a logical heading hierarchy (h1 > h2 > h3)?
    - Does the heading structure make sense when read alone?

[ ] Check forms
    - Does every input have a visible label?
    - Are error messages descriptive and linked to inputs?

The Accessibility Tree

Browsers build an accessibility tree alongside the DOM. This is what assistive technologies read.

// You can inspect the accessibility tree in Chrome DevTools:
// 1. Open DevTools (F12)
// 2. Go to Elements panel
// 3. Click the "Accessibility" tab in the sidebar
// 4. Select any element to see its accessible name, role, and state

// The accessibility tree for a button might look like:
// Role: button
// Name: "Submit form"
// State: focusable
// Description: "Submits the registration form"

Understanding the accessibility tree is essential because screen readers do not read your visual layout -- they read this tree. If your accessibility tree is wrong, screen reader users get a broken experience.

Assistive Technologies Overview

TechnologyUsersWhat It Does
Screen readersBlind, low visionReads content aloud
Screen magnifiersLow visionEnlarges portions of the screen
Voice controlMotor impairmentsControls the computer by voice
Switch devicesSevere motor issuesSingle-button navigation
Braille displaysBlindConverts text to braille
Eye trackingMotor impairmentsControls cursor with eye gaze

Key Takeaways

  • Accessibility means making software usable by everyone
  • The POUR principles (Perceivable, Operable, Understandable, Robust) guide all a11y work
  • Over 1 billion people have disabilities -- your users are among them
  • Use semantic HTML as your foundation -- it is accessible by default
  • The accessibility tree is what assistive technologies actually read
  • Start with the 5-minute checklist to catch the most common issues

Next, you will dive into the WCAG guidelines that define the specific success criteria your applications must meet.