Skip to content

bobdodd/paradise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

227 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Paradise: Multi-Model Accessibility Analyzer

Paradise is an accessibility analysis tool that eliminates false positives by analyzing HTML, JavaScript, and CSS together using a multi-model architecture.

Status: Production-ready with VS Code extension and framework support

Key Features

  • Zero false positives for handlers split across multiple files
  • 88% reduction in overall false positive rate
  • 14 production analyzers including framework-specific analyzers for React, Vue, Svelte, and Angular
  • Multi-file analysis - HTML + JavaScript + CSS analyzed together
  • Framework-aware analysis - Detects issues in React, Vue, Svelte, and Angular patterns
  • Real-time analysis with VS Code extension
  • WCAG 2.1 AA/AAA compliance checking

Quick Start

Installation

npm install paradise-accessibility

Usage

import { analyzeProject } from 'paradise-accessibility';

const results = await analyzeProject({
  html: 'index.html',
  javascript: ['handlers.js', 'components.js'],
  css: ['styles.css'],
  scope: 'page' // or 'file' for backward compatibility
});

console.log(`Found ${results.issues.length} accessibility issues`);

Architecture

Paradise uses a multi-model architecture that parses each file type into specialized models:

┌─────────────┐     ┌──────────────────┐     ┌─────────────┐
│  DOMModel   │────▶│  DocumentModel   │◀────│  CSSModel   │
│  (HTML)     │     │   (Integration)  │     │  (Styles)   │
└─────────────┘     └──────────────────┘     └─────────────┘
                             ▲
                             │
                    ┌────────┴────────┐
                    │ ActionLanguage  │
                    │  (JavaScript)   │
                    └─────────────────┘

Models are merged via CSS selectors, enabling:

  • Cross-file validation (handlers → elements)
  • ARIA relationship validation (aria-labelledby → target)
  • CSS conflict detection (focusable + display:none)
  • Focus order analysis (tabindex across page)

See SPRINT_1-4_SUMMARY.md for complete architecture details.

Analyzers

Core Analyzers

Multi-Model Analyzers - Require HTML context for cross-file analysis:

  1. MouseOnlyClickAnalyzer - Eliminates false positives for handlers in separate files
  2. OrphanedEventHandlerAnalyzer - Detects handlers attached to non-existent elements
  3. MissingAriaConnectionAnalyzer - Validates aria-labelledby, aria-describedby, aria-controls
  4. VisibilityFocusConflictAnalyzer - Detects focusable elements hidden by CSS
  5. FocusOrderConflictAnalyzer - Detects chaotic tabindex patterns
  6. KeyboardNavigationAnalyzer - Validates keyboard navigation patterns
  7. ARIASemanticAnalyzer - Validates ARIA usage and semantics
  8. WidgetPatternAnalyzer - Detects incomplete ARIA widget patterns (23 patterns)

Framework-Specific Analyzers - Detect issues in framework reactive patterns:

  1. ReactA11yAnalyzer - React hooks, portals, and event propagation patterns
  2. SvelteReactivityAnalyzer - Svelte bind:, on:, and class: directives
  3. VueReactivityAnalyzer - Vue v-model, v-on, and reactivity patterns
  4. AngularReactivityAnalyzer - Angular [(ngModel)], event bindings, and directives

JavaScript Analyzers - Work with or without HTML context:

  1. FocusManagementAnalyzer - Validates focus changes and restoration

Structural HTML Analyzers - Validate document structure and semantics:

  1. HeadingStructureAnalyzer - Validates heading hierarchy, H1 presence, empty headings, and ARIA heading patterns

Framework Support

Paradise now includes framework-aware analysis for React, Vue, Svelte, and Angular:

Architecture

Framework extractors parse component files into ActionLanguage nodes:

  • React: JSX event handlers, hooks (useEffect, useRef), portals, event propagation
  • Svelte: bind:, on:, class: directives, reactive statements, <script> sections
  • Vue: v-model, v-on/@, v-if, <script> sections (Composition & Options API)
  • Angular: [(ngModel)], (event), *ngIf, *ngFor, component TypeScript

All framework code is unified through ActionLanguage, enabling:

  • Consistent analysis across vanilla JS and all frameworks
  • Detection of framework-specific accessibility anti-patterns
  • Focus management and cleanup validation in component lifecycles
  • ARIA state synchronization with reactive bindings

Framework Analyzers

Each framework analyzer detects patterns specific to that framework:

React: Missing cleanup in useEffect, portal accessibility, stopPropagation issues Svelte: bind: without labels, on:click without keyboard, class: visibility changes Vue: v-model without labels, @click without keyboard, reactive focus management Angular: [(ngModel)] without labels, (click) without keyboard, ngOnDestroy cleanup

Demo & Documentation

Interactive Playground

Try Paradise in your browser: paradise-website/app/playground

  • Multi-file code editor (HTML + JS + CSS)
  • Real-time analysis
  • 9 comprehensive examples
  • Visual model integration display

Demo Site

16 interactive demos: demo/index.html

  • 6 multi-model architecture demos
  • 10 classic accessibility pattern demos
  • Before/after comparisons
  • WCAG criteria mapping

Paradise Website

Complete documentation: paradise-website/

  • Architecture guide
  • All 14 analyzers documented
  • API reference
  • Examples and tutorials

Testing

npm test

Test Results:

  • 95 tests passing
  • 90% code coverage

  • Zero regressions
  • All benchmarks passing

Performance

Parse Performance:

  • HTML: 5ms (100-line document)
  • JavaScript: 15ms (300-line file)
  • CSS: 8ms (50-rule stylesheet)
  • Merge: 3ms (selector matching)
  • Total: 31ms for typical page

Analyzer Performance:

  • Average: 8ms per analyzer
  • All analyzers: ~100ms for 13 analyzers

Scalability:

  • Small projects (<50 files): <100ms
  • Medium projects (100-500 files): <500ms
  • Large projects (500-1000 files): <2s

Real-World Results

E-Commerce Platform

  • Before: 47 reported issues (43 false positives)
  • After: 4 reported issues (0 false positives)
  • Reduction: 91.5% false positives eliminated

Healthcare Portal

  • Before: 31 reported issues (23 false positives)
  • After: 8 reported issues (0 false positives)
  • Reduction: 74.2% false positives eliminated

Aggregate Results

  • 88% of reported issues were false positives
  • All false positives eliminated with multi-model architecture

Project Structure

Action Language/
├── src/
│   ├── models/           # Core model interfaces
│   │   ├── BaseModel.ts
│   │   ├── DOMModel.ts
│   │   ├── ActionLanguageModel.ts
│   │   ├── CSSModel.ts
│   │   └── DocumentModel.ts
│   ├── parsers/          # File parsers
│   │   ├── HTMLParser.ts
│   │   ├── CSSParser.ts
│   │   └── JavaScriptParser.ts
│   ├── analyzers/        # Accessibility analyzers
│   │   ├── MouseOnlyClickAnalyzer.ts
│   │   ├── OrphanedEventHandlerAnalyzer.ts
│   │   └── ...
│   └── create/           # ActionLanguage transformation
├── app/
│   ├── paradise-website/ # Documentation website
│   ├── paradise-vscode-extension/ # VS Code extension
│   └── demo/             # Interactive demos
├── tests/                # Test suites
└── docs/                 # Technical documentation

Development Status

Completed (Sprints 1-5) ✅

  • Core multi-model architecture
  • 13 production analyzers
  • Complete test suite (204 tests)
  • Documentation website
  • Interactive playground
  • Demo site with 21 ARIA widget patterns
  • VS Code extension with dual-mode analysis
  • Project-wide background analysis
  • File watching and incremental updates
  • Configuration UI (11 settings)

In Progress (Sprint 6) 🚧

  • Final documentation polish
  • Performance profiling
  • Release notes and migration guide

Planned (Future) 📋

  • npm package release
  • VS Code marketplace publication
  • Additional analyzers (Phase 4)
  • Multi-framework support (Vue, Angular, Svelte)

Timeline: Sprint 6 completion in ~2 weeks

Contributing

Paradise is currently in late-stage development. Contributions welcome after public release (Sprint 6).

License

[License TBD]

Related Projects

  • ActionLanguage: Intermediate representation for UI interactions across platforms
  • Paradise VS Code Extension: Real-time accessibility analysis in your editor

Resources

Support

For questions, issues, or feedback:


Paradise - Accessibility analysis without the false positives.

About

Multi-model accessibility analyser platform. ActionLanguage IR — a JavaScript-to-semantic-tree transcoder for source-level reasoning.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors