Skip to main content
00 / OPTICAL ACCESSIBILITY INSTRUMENTLENS-A11Y // ZERO-DEPENDENCY // <15KB GZIP

See your website the way everyone else does.

Most interfaces are calibrated for a single pair of eyes on a $2,000 studio display. Aperture (`lens-a11y`) is a precision optical instrument that simulates color blindness, cataracts, glaucoma, dyslexia, and motor tremors directly on your live DOM—and audits WCAG 2.1 compliance in real time.

13 MODES
OPTICAL / COGNITIVE / MOTOR
< 15 KB
ZERO-DEPENDENCY GZIP
8 RULES
LIVE WCAG 2.1 DOM SCANNER
SHIFT + P
DARKROOM EMPATHY CHALLENGE
01 / SIMULATIONS

Eight clinical models of perception

01 // M-CONE~6% of males

Deuteranopia

Absent green-sensitive M-cones cause red and green hues to collapse into muted olive-brown tones.

02 // L-CONE~1% of males

Protanopia

Absent red-sensitive L-cones dim red wavelengths significantly and confuse red, orange, and green UI alerts.

03 // S-CONE~0.01% global

Tritanopia

Blue-yellow color blindness reduces sensitivity to short blue wavelengths, shifting blues toward teal and yellows toward pink.

04 // OPACITY~33% over age 65

Cataracts

Clouding of the crystalline lens scatters incoming light, producing warm yellowing haze and reduced contrast.

05 // PERIPHERAL~80M worldwide

Glaucoma

Optic nerve damage constricts the visual field from the outside in, hiding off-center toasts and edge navigation.

06 // CENTRAL~196M worldwide

Macular Degeneration

Central retinal degradation creates a dark scotoma right where the eye fixates, forcing reliance on peripheral vision.

07 // ACUITY~2.2B worldwide

Low Visual Acuity

Unresolved refractive error blurs fine 12px labels and hairline borders that lack adequate stroke weight.

08 // COGNITIVE~10–15% global

Dyslexia Crowding

Dense, tightly tracked paragraphs trigger orthographic letter swapping and visual crowding fatigue.

02 / BEFORE & AFTER PLAYGROUND

Compare normal vs. simulated optics

STARTERAvailable
$0/mo
  • • 1,000 monthly checks
  • • Community support
  • • Basic SVG filters
Normal Vision Layer
OPTICAL PROMost Popular
$29/mo
  • • Unlimited DOM audits
  • • CI/CD contrast gate
  • • Custom color matrices
Normal Vision Layer
DEPRECATED TIERQuota Exceeded
$99/mo
  • • Legacy API v0
  • • Red-only alert badges
  • • Requires manual patch
Normal Vision Layer
⇄
03 / AUTOMATED WCAG AUDITOR

Pinpoint defects with surgical annotations

SPECIMEN // FLAWED CHECKOUT WIDGETSTATUS: UNSCANNED
Order Summary

Shipping taxes and customs duties are calculated at final step. (Low-contrast specimen text)

Enter promo code... (Unlabeled input specimen)
Total: $49.00→
AWAITING OPTICAL SCAN

No active annotations yet

Click "Run Audit on Sample UI" above to sweep the checkout specimen and reveal surgical callout annotations.

04 / KEYBOARD TAB-ORDER TOPOLOGY

Visualize every focus stop in sequence

Press Tab across the controls below (or click any stop) to watch the focus vector trace the keyboard navigation order.

05 / UNDER THE HOOD // SYSTEM ARCHITECTURE

Engineered like a camera. Zero compromises on runtime weight.

Every design decision inside `lens-a11y` prioritizes clinical accuracy, complete DOM isolation, and instant teardown so you can run it safely on production apps.

ARCH-01 // SHADOW DOM

Hermetic CSS & Filter Isolation

The floating HUD mounts inside an encapsulated Shadow Root (#lens-a11y-host) with Trusted Types support. Host stylesheets never bleed into the instrument, and SVG color matrices filter the host page without distorting the HUD.

ARCH-02 // MACHADO MATRICES

Physiological sRGB Color Math

Instead of naive hue shifts, Aperture injects hardware-accelerated <feColorMatrix> primitives calibrated to Machado, Oliveira & Fernandes (2009) cone-deficiency equations alongside alpha-blended WCAG 2.1 luminance checks.

ARCH-03 // LOSSLESS DOM

100% Reversible TreeWalker State

Cognitive and motor modes inspect text and interactive bounding boxes using native TreeWalker APIs, caching original TextNode references in a WeakMap/Map so calling Lens.off() restores the exact byte-for-byte DOM.

05 / ZERO-CONFIG INTEGRATION

Drop into any stack in seconds

index.html (One-Line CDN Script)
<script src="https://cdn.jsdelivr.net/npm/lens-a11y@0.1/dist/lens.min.js" data-lens="deuteranopia"></script>
06 / FREQUENTLY ASKED QUESTIONS

Does Lens permanently alter my website's DOM or styles?

Never. The Floating HUD lives inside an isolated Shadow DOM, and all simulations—including Dyslexia text-node swapping—restore the exact original DOM state immediately when turned off.

Does it require any backend, API keys, or telemetry?

Zero. Everything runs 100% locally in the browser using native SVG feColorMatrix filters, CSS rules, and computed styles. Bundle size is under 15 KB gzipped.

How accurate are the color blindness simulations?

Aperture uses the peer-reviewed Machado, Oliveira, and Fernandes (2009) physiologically-based color-vision deficiency matrices in sRGB space.

Can I run the WCAG auditor in automated CI pipelines?

Yes! Import runDomAudit and getContrastRatio directly from lens-a11y in Vitest or Playwright to gate pull requests on accessibility scores.

COMMUNITY & OPEN-SOURCE CRAFT

Built for the web, free forever. Show your support by dropping a ★ on GitHub.

★ Star Aperture on GitHub
APERTURE MANIFESTO // LENS-A11Y

Open source. Inclusive by design. Accessible by default.

APERTURE (LENS-A11Y v0.1) // MIT LICENSE // BUILT BY GAURAV JOSHI
PRESS SHIFT + P FOR DARKROOM CHALLENGE•100/100 WCAG DOGFOODED