AccessLens

AccessLens is an explainable accessibility auditing system that goes beyond basic WCAG rule checks by analyzing rendered structure, visual contrast, and contextual clarity using layered reasoning.

Description

Vision

Over time, the web has grown increasingly complex. Modern websites rely heavily on dynamic JavaScript rendering, custom UI components, and visually-driven design systems. While accessibility standards such as WCAG provide structured guidelines, most existing auditing tools focus primarily on rule-based validation of HTML attributes.

This creates a gap.

A page may technically satisfy attribute-level requirements while still being structurally confusing, visually inaccessible, or contextually misleading to users relying on assistive technologies.

The deeper issue is not the absence of rules — it is the absence of layered reasoning.

Current accessibility tools often:

  • Validate static markup

  • Flag missing attributes

  • Output raw violations

But they rarely:

  • Analyze the rendered accessibility tree

  • Validate heading hierarchy as structural flow

  • Compute contrast mathematically from computed styles

  • Evaluate contextual clarity of alt text

  • Provide confidence-aware reasoning

AccessLens addresses this gap.

It does not replace WCAG validation.

It builds on top of it.

AccessLens introduces a layered accessibility auditing framework combining deterministic rule engines with structural modeling and optional AI-assisted contextual evaluation.

The goal is not automation without oversight.

The goal is explainable accessibility reasoning.


Core Capabilities of AccessLens


1. Deterministic WCAG Rule Validation

What it does

  • Detects missing alt attributes

  • Flags unlabelled form inputs

  • Identifies ARIA misuse

  • Validates landmark roles

  • Detects keyboard accessibility violations

What makes it distinct

AccessLens does not reinvent WCAG validation. Instead, it integrates established rule engines (e.g., axe-core) into a unified issue schema. All deterministic violations are reproducible and standards-aligned.

This ensures a strong compliance baseline before higher-level reasoning is applied.

Determinism is the foundation — not an afterthought.


2. Accessibility Tree Structural Analysis

What it does

  • Extracts the rendered accessibility tree using browser automation

  • Evaluates heading hierarchy consistency

  • Detects missing landmark regions

  • Identifies structural navigation ambiguity

  • Maps interactive elements to semantic roles

What makes it distinct

Most tools inspect HTML source.

AccessLens inspects the rendered accessibility tree — the structure assistive technologies actually interpret.

This allows detection of structural issues even when markup appears syntactically valid.

Accessibility is modeled as structure, not just attributes.


3. Mathematical Contrast Validation Engine

What it does

  • Extracts computed foreground and background colors

  • Calculates luminance using WCAG contrast formulas

  • Validates contrast ratios against 4.5:1 / 3:1 thresholds

  • Flags insufficient contrast with exact computed values

What makes it distinct

Rather than relying on browser warnings, AccessLens computes contrast explicitly using perceptual luminance formulas:

Contrast Ratio = (L1 + 0.05) / (L2 + 0.05)

This separates visual estimation from mathematical verification.

Perception may vary.

The math does not.


4. Unified Issue Schema

What it does

  • Normalizes output from multiple engines

  • Stores issue type, severity, WCAG reference

  • Includes explanation and confidence score

  • Maintains deterministic vs AI-origin flag

What makes it distinct

Instead of returning fragmented tool outputs, AccessLens standardizes all findings into a unified issue model.

This enables:

  • Structured reporting

  • Consistent scoring

  • Extensible engine integration

  • Confidence-aware reasoning

The schema becomes the contract of the framework.


5. AI-Assisted Contextual Evaluation (Optional Layer)

What it does

  • Evaluates alt text quality beyond mere presence

  • Detects visually cluttered layouts

  • Identifies misleading descriptions

  • Generates suggested code fixes

What makes it distinct

AI findings:

  • Include confidence percentage

  • Reference related WCAG criteria

  • Never override deterministic results

  • Are clearly marked as probabilistic

AI is augmentation, not authority.

This prevents hallucination-based compliance claims.


6. Confidence-Aware Reporting

What it does

  • Separates deterministic violations from probabilistic findings

  • Assigns severity levels

  • Includes reasoning breakdown

  • Generates developer-friendly remediation suggestions

What makes it distinct

Most tools present flat violation lists.

AccessLens provides layered reasoning:

  • What is wrong

  • Why it is wrong

  • Which standard it relates to

  • How confident the system is

  • Suggested remediation code

Transparency increases trust and usability.


7. Modular Engine Architecture

What it does

  • Allows independent validation engines

  • Supports plugin-based extensions

  • Enables future integration of additional analyzers

What makes it distinct

AccessLens is not a single scanner.

It is an extensible framework designed for contribution. New engines can register with the core via a defined interface and emit standardized issues.

Framework architecture increases long-term FOSS viability.


Use Cases for AccessLens


1. Developer Pre-Deployment Audit

A frontend developer wants to validate accessibility before pushing to production. Traditional linting tools detect attribute issues but fail to identify structural inconsistencies.

AccessLens performs:

  • Rule validation

  • Heading hierarchy analysis

  • Contrast verification

  • Landmark structure validation

The developer receives a structured report with exact remediation guidance.


2. Design System Validation

A design team builds a component library. Individual components appear accessible, but when composed into full pages, structural issues emerge.

AccessLens evaluates rendered output, not isolated markup, detecting:

  • Landmark duplication

  • Nested heading misorders

  • Inconsistent contrast across dynamic states

This ensures system-level accessibility integrity.


3. Accessibility Compliance Review

Organizations preparing for accessibility audits can use AccessLens to generate structured, explainable reports with WCAG references and confidence scores.

The framework produces traceable outputs suitable for documentation and remediation planning.


System Architecture Overview

AccessLens follows a layered architecture:

  1. Frontend Interface (Next.js)

  2. Backend Orchestration (FastAPI)

  3. Rendering & Crawling Layer (Playwright)

  4. Deterministic Validation Engine (axe-core)

  5. Structural Accessibility Tree Analyzer

  6. Contrast Computation Engine

  7. Optional AI Vision Layer

  8. Unified Issue Schema & Scoring Engine

  9. Report Generation Module

Each layer operates independently but outputs through a shared schema contract.


Why AccessLens ?

1. Layered Reasoning Model

Combines deterministic and probabilistic analysis without conflating them.

2. Framework Orientation

Designed for extensibility and plugin integration.

3. Standards Alignment

Grounded in WCAG compliance.

4. Explainability as Core Constraint

Every issue is reproducible or confidence-scored.

5. Open Architecture

Clear interfaces enable community contribution.


Strategic Positioning

A modular accessibility auditing framework that integrates deterministic WCAG validation, structural accessibility modeling, mathematical contrast verification, and optional AI-assisted contextual reasoning — producing explainable, confidence-aware accessibility reports.

Not an AI accessibility fixer.

Not a compliance guarantee.

A structured reasoning engine.

Issues & PRs Board
No issues or pull requests added.