Faisalaffan Blog
|
🇬🇧
Faisalaffan Blog
Engineering10 min read

97% of Websites Fail Accessibility Tests — Here's What You're Doing Wrong

Most developers think accessibility is 'not urgent' until they get sued. Learn WCAG 2.2, POUR principles, and implementation techniques you can apply immediately before your digital presence becomes a legal nightmare — and more importantly — a human failure.

Faisal Affan
Faisal Affan
Published
Gallery
1 / 3

Accessibility: When Digital Must Leave No One Behind

"The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect." — Tim Berners-Lee, W3C Director

Split composition — accessible website with glowing features vs broken website with legal warnings, a gavel hovering above


Why Should You Read This Article?

Critical Statistics

1.3 billion people with disabilities globally. 97% of homepages don't meet basic standards. Assistive technology market: $30 billion+.


Overview: What Is Accessibility (A11y)?

Accessibility (A11y) = the practice of making digital products usable by everyone, including people with disabilities.

Two Standards You Must Know

PropertyTypeDescription
ADA — Americans with Disabilities Act Law Legal compliance in the US. Websites can be sued if not accessible.
WCAG — Web Content Accessibility Guidelines Technical Global standard from W3C. Used as implementation reference.

WCAG Principles: POUR

graph TD
    A[WCAG POUR] --> B[Perceivable]
    A --> C[Operable]
    A --> D[Understandable]
    A --> E[Robust]

    B --> B1[Alt text]
    B --> B2[Captions/Transcripts]
    B --> B3[Color contrast 4.5:1]

    C --> C1[Keyboard navigation]
    C --> C2[Skip links]
    C --> C3[No keyboard trap]

    D --> D1[Clear language]
    D --> D2[Consistent navigation]
    D --> D3[Error suggestions]

    E --> E1[Valid HTML]
    E --> E2[Proper ARIA]
    E --> E3[Screen reader compatible]

The four POUR principles as interconnected puzzle pieces forming a protective shield — Perceivable, Operable, Understandable, Robust


Spectrum of Disabilities to Accommodate

PropertyTypeDescription
Visual Screen readers (JAWS, NVDA, VoiceOver) Alt text, high contrast, keyboard nav
Motor Switch access, voice control Large targets, keyboard nav, extended time
Hearing Hearing aids, captioning Transcripts, captions, visual alerts
Cognitive Screen magnifiers, reading assistants Simple content, consistent nav

WCAG Levels: Which Should You Target?

Recommendation

Target WCAG AA as your baseline compliance. This is what most international regulations use.


Risks If You Skip Accessibility

4 Main Risks:

Risk Impact
Legal Lawsuits in US/EU markets — can be very expensive
Users 15-20% of population with limitations can't use your product
SEO Poor HTML structure = SEO suffers
Brand Non-inclusive = damaged brand image

WCAG 2.2: 9 New Things You Need to Know

The latest version (October 2023) added 9 new Success Criteria:

Focus Not Obscured (AA)

Elements with focus must not be hidden by sticky headers.

Focus Appearance (AAA)

Focus indicator must have 3:1+ contrast and sufficient area.

Dragging Movements (AA)

All drag-and-drop must have single-pointer alternatives (up/down buttons).

Target Size (AA)

Interactive targets minimum 24x24 CSS pixels.

Target Size Enhanced (AAA)

Adequate clearance for smaller targets.

Consistent Help (A)

Help mechanism on one page = help on all pages with consistent position.

Redundant Entry (A)

Don't request information already input previously.

Accessible Authentication (AA)

Cognitive puzzle CAPTCHAs not allowed — provide alternatives.

Focus Not Obscured Enhanced (AAA)

No part of focused element may be hidden.


Legal Framework: ADA and Section 508

Americans with Disabilities Act (ADA)

PropertyTypeDescription
Title I Employment Employees with disabilities must receive reasonable accommodations
Title III Public Access Public accommodations — including websites — must not discriminate

Since Facebook v. Nizzud (2019) and Domino's Pizza v. Laredo (2019), courts have consistently ruled that ADA applies to websites.

Section 508

For US federal entities, all EICT must meet Access Board standards.


Practical Implementation: From Theory to Code

1. Semantic HTML: The Foundation You Can't Skip

Use HTML elements according to their function:

HTML
<!-- ❌ Bad: Not semantic -->
<div class="header">
  <div class="nav">
    <div class="logo">Brand</div>
  </div>
</div>

<!-- ✅ Good: Semantic with landmarks -->
<header>
  <nav aria-label="Main navigation">
    <a href="/" aria-label="Home">Brand</a>
  </nav>
</header>
<main id="main-content">
  <article>...</article>
</main>
<footer>...</footer>
Opinion

Use <button> instead of <div> for interactive elements. Screen readers need to know this is a button.

2. Alt Text: Description for Those Who Can't See

PropertyTypeDescription
Decorative <img src="divider.svg" alt=""> Empty (alt="")
Informative <img src="dashboard.png" alt="Dashboard with 3 alerts"> Brief description
Complex alt="Chart..." + link Detailed description + link to full description

3. Keyboard Navigation: Focus and Tab Order

Tab Order

Ensure tab order follows visual reading order. Avoid positive tabindex.

Focus Indicators

Never remove outline without a clear alternative.

Keyboard Traps

Ensure no element traps keyboard users.

Shortcuts

Provide mechanism to disable/remap single-key shortcuts.

CSS
/* ✅ Good: Clear focus indicator */
:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
}

/* ❌ Bad: outline: none without alternative */
button:focus {
  outline: none;
}

Close-up of a keyboard with the Tab key glowing — a golden focus ring wraps around UI elements like a protective aura, with screen reader waveforms above

4. Skip Links: Efficient Navigation for Keyboard Users

HTML
<!-- Place as first element in body -->
<a href="#main-content" class="skip-link">
  Skip to main content
</a>
CSS
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #005fcc;
  color: white;
  padding: 8px 16px;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

5. Color Contrast: Not Just Aesthetics

WCAG Contrast Requirements
  • 4.5:1 — Normal text (AA)
  • 3:1 — Large text 18pt+ or 14pt+ bold (AA)
  • 3:1 — Component states and graphical objects (AA)
CSS
:root {
  /* ✅ Good: Sufficient contrast */
  --text-primary: #1a1a2e;   /* 15.5:1 against white */
  --text-secondary: #4a4a68; /* 7.2:1 against white */

  /* ❌ Bad: Insufficient contrast */
  --text-muted: #888888; /* 2.8:1 against white */
}

6. ARIA: Use Wisely

Primary ARIA Rule

If native HTML is sufficient, use HTML. ARIA doesn't make elements more accessible — it just adds information for assistive technology.

JSX
// ❌ Bad: Unnecessary ARIA
<div role="button" tabindex="0" onClick={handleClick}>
  Submit
</div>

// ✅ Good: Native HTML
<button type="submit">Submit</button>

// ❌ Bad: Label not connected
<input type="text" placeholder="Email" />

// ✅ Good: Explicit association
<label htmlFor="email">Email</label>
<input id="email" type="email" />

7. Forms: Informative Error Handling

JSX
<label htmlFor="password">Password</label>
<input
  id="password"
  type="password"
  aria-describedby="password-requirements password-error"
  aria-invalid="true"
/>
<p id="password-requirements">
  Minimum 8 characters, 1 uppercase, 1 number
</p>
<p id="password-error" role="alert">
  Password must contain at least 8 characters
</p>

Tools: Audit, Testing, Monitoring

Automated Testing (Fast, Scalable)

Google Lighthouse

Built-in Chrome DevTools. Quick audit with score + suggestions.

Terminal
npx lighthouse https://example.com --only-categories=accessibility

Screen Reader Testing: Ground Truth

Opinion: 80% of devs skip screen reader testing. This is the biggest blind spot.

Testing with real assistive technology is the only way to know the actual user experience.

PropertyTypeDescription
NVDA Windows / Firefox General Windows accessibility
JAWS Windows / Chrome/Edge Enterprise environments
VoiceOver macOS/iOS / Safari Apple ecosystem
TalkBack Android / Chrome Mobile accessibility
Orca Linux / Firefox Linux desktop

Contrast & Visual Tools

PropertyTypeDescription
WebAIM Contrast Checker Web Tool Validate color contrast ratio
Stark (Figma/Sketch) Design Plugin Design-time checking

Manual Testing Checklist

  • Tab navigation without mouse — all functions accessible?
  • Focus state clear — visible?
  • Forms work with keyboard — all inputs reachable?
  • No "traps" — modals/dropdowns can be escaped?

Testing Checklist: Before Launch

Pre-Launch Checklist
  • Keyboard-only navigation: all functions accessible without mouse?
  • Screen reader: reading order logical?
  • Zoom 200%: content still usable?
  • High contrast mode: all elements visible?
  • Reduced motion: animations respect prefers-reduced-motion?

Healthcare Apps: Additional Checklist

PropertyTypeDescription
Real-time telehealth captions Healthcare Patients may be deaf or hard of hearing
Alternative for medical devices Medical Devices Data from glucose/BP monitors must be accessible
Multi-language support Localization Diverse patient populations
Cognitive load management Cognitive Accessibility Elderly/cognitively impaired frequently use portals
Emergency accessibility Emergency Response Critical alerts must be accessible in all modes
HIPAA + ADA

In healthcare, compliance isn't just WCAG — must align with HIPAA Privacy Rule. Some accessibility accommodations must consider HIPAA implications.


Action Plan: Where to Start?

Priority 1: Security Mindset

Treat accessibility like a vulnerability. Broken accessibility = UX vulnerability. Like security, it must be integrated from the start.

Priority 2: WCAG AA Minimum Checklist
  • Alt text for all images
  • Keyboard fully usable
  • Contrast ≥ 4.5:1
  • Clear form labels
  • ARIA only when needed
Priority 3: Minimum Stack
  1. Lighthouse — quick check
  2. axe DevTools — debug
  3. NVDA / VoiceOver — manual reality check
Priority 4: Production-Grade
  • Pa11y / axe CI integration
  • Design system enforce contrast + semantics
  • Fail build if accessibility score < threshold

First-Principles: Accessibility ≈ API Contract for Humans

Insight

If APIs must be predictable for machines, then UI must be predictable for humans with various limitations.

Engineers who understand this typically:

  • Write more semantic code
  • Build more robust UX
  • Have fewer bugs

Accessibility Tools = Observability Layer for UX

Without these:

  • UI looks "normal"
  • But broken for some users

With these:

  • UX becomes measurable (like latency / error rate)

A grand accessible doorway — wide ramp, braille signage, automatic sensor, diverse silhouettes entering together through the same door


Conclusion

Accessibility is not a feature added at the end — it is a fundamental architecture principle.

Final Action Items
  1. Audit current state with axe-core or Lighthouse
  2. Fix high-impact issues: keyboard navigation, alt text, color contrast
  3. Implement skip links and focus management
  4. Add accessibility to Definition of Done
  5. Regular testing with assistive technology

Good accessibility = good design. When we build for edge cases, the entire user experience improves.

A truly universal digital product works for everyone, without exception.


References

PropertyTypeDescription
WCAG 2.2 Quick Reference w3.org/WAI/WCAG22/quickref Quick reference guide for WCAG 2.2
WAI ARIA Documentation w3.org/WAI/ARIA Official WAI ARIA documentation
WebAIM Contrast Checker webaim.org/resources/contrastchecker Validate color contrast ratio
axe DevTools deque.com/axe/devtools Accessibility testing tool by Deque
Accessibility Insights accessibilityinsights.io Microsoft's accessibility auditing tool
Inclusive Components inclusive-components.design Pattern library for accessible components

Related stories

Engineering
Engineering
Integer to Roman: The Greedy Mapping That Always Shows Up in Interviews

Integer to Roman: The Greedy Mapping That Always Shows Up in Interviews

Breaking down the integer to Roman numeral conversion problem — from basic Roman numeral rules, the subtractive notation pitfalls (IV, IX, XL...), to a clean, interview-ready greedy O(1) solution. Complete with mapping table, step-by-step visualization, and why this approach is optimal given the 1-3999 constraint.
Faisal Affan
Faisal Affan
Published
Engineering
Best Time to Buy and Sell Stock: From Brute Force to One-Pass O(n)

Best Time to Buy and Sell Stock: From Brute Force to One-Pass O(n)

Master the classic coding interview problem 'Best Time to Buy and Sell Stock' with step-by-step explanation — from the naive brute force approach, recognizing patterns, to the optimal one-pass O(n) solution using sliding window / two-pointer technique. Complete with array visualization, complexity analysis, and the intuition behind every decision.
Faisal Affan
Faisal Affan
Published
Engineering
Services I've Handled — Full-Stack Engineering, Architecture & Product Strategy

Services I've Handled — Full-Stack Engineering, Architecture & Product Strategy

A comprehensive list of professional services I've delivered across multiple industries: IoT fleet management, fintech core banking integration, cyber insurance platforms, education technology, and enterprise digital transformation. Each service backed by real production systems still running today.
Faisal Affan
Faisal Affan
Published
Engineering
Portfolio Strategy by Career Level — Junior to CTO

Portfolio Strategy by Career Level — Junior to CTO

Your portfolio should reflect your seniority level, not just list every project you've touched. Junior engineers sell potential and fundamentals. Senior engineers sell depth and architecture. Staff engineers sell leverage. CTOs sell business outcomes. Here's exactly what to put in your portfolio at each level — with concrete examples and a universal format you can use today.
Faisal Affan
Faisal Affan
Published