Deuteranopia
Absent green-sensitive M-cones cause red and green hues to collapse into muted olive-brown tones.
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.
Absent green-sensitive M-cones cause red and green hues to collapse into muted olive-brown tones.
Absent red-sensitive L-cones dim red wavelengths significantly and confuse red, orange, and green UI alerts.
Blue-yellow color blindness reduces sensitivity to short blue wavelengths, shifting blues toward teal and yellows toward pink.
Clouding of the crystalline lens scatters incoming light, producing warm yellowing haze and reduced contrast.
Optic nerve damage constricts the visual field from the outside in, hiding off-center toasts and edge navigation.
Central retinal degradation creates a dark scotoma right where the eye fixates, forcing reliance on peripheral vision.
Unresolved refractive error blurs fine 12px labels and hairline borders that lack adequate stroke weight.
Dense, tightly tracked paragraphs trigger orthographic letter swapping and visual crowding fatigue.
Shipping taxes and customs duties are calculated at final step. (Low-contrast specimen text)
Click "Run Audit on Sample UI" above to sweep the checkout specimen and reveal surgical callout annotations.
Press Tab across the controls below (or click any stop) to watch the focus vector trace the keyboard navigation order.
Every design decision inside `lens-a11y` prioritizes clinical accuracy, complete DOM isolation, and instant teardown so you can run it safely on production apps.
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.
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.
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.
<script src="https://cdn.jsdelivr.net/npm/lens-a11y@0.1/dist/lens.min.js" data-lens="deuteranopia"></script>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.
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.
Aperture uses the peer-reviewed Machado, Oliveira, and Fernandes (2009) physiologically-based color-vision deficiency matrices in sRGB space.
Yes! Import runDomAudit and getContrastRatio directly from lens-a11y in Vitest or Playwright to gate pull requests on accessibility scores.