# dharsanhunt/compiletimeaccessibilityverification architecture

> Architecture diagram of the GitHub repository dharsanhunt/compiletimeaccessibilityverification, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dharsanhunt/compiletimeaccessibilityverification
- Repository: https://github.com/dharsanhunt/compiletimeaccessibilityverification

## Overview

A11yCC is a declarative UI DSL compiler and compile-time accessibility model checker. Its main workflow parses DSL, validates semantic structure, explores toggle states and transitions, then reports WCAG diagnostics; CLI commands also emit accessible HTML or produce tab-order repairs. The README documents a browser-based Studio, represented here by its listed `index.html`; its implementation was not sampled. The tree and source index show a parallel `kanaforge` package, so both substantial module sets are represented. Edges reflect documented pipeline relationships or source-index references; unsampled internals are not inferred.

Main entry points: [`a11ycc/cli.py`](https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/a11ycc/cli.py) (CLI commands), [`kanaforge/cli.py`](https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/kanaforge/cli.py) (CLI commands), [`a11ycc/analyzer.py`](https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/a11ycc/analyzer.py) (Accessibility analysis), [`kanaforge/analyzer.py`](https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/kanaforge/analyzer.py) (Accessibility analysis)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entry"]
  node_cli["CLI commands<br/>[cli.py]"]
  node_studio["Web Studio<br/>[index.html]"]
end

subgraph group_frontend["DSL frontend"]
  node_lexer["Tokenizer<br/>[lexer.py]"]
  node_parser["DSL parser<br/>[parser.py]"]
  node_ast["Program AST<br/>[ast_nodes.py]"]
end

subgraph group_verification["Verification"]
  node_symbols["Semantic validation<br/>[symbol_table.py]"]
  node_states["State-space engine<br/>[state_space.py]"]
  node_analyzer["Accessibility analysis<br/>[analyzer.py]"]
  node_profiles["Accessibility profiles<br/>[profiles.py]"]
end

subgraph group_outputs["Compiler outputs"]
  node_diagnostics["WCAG diagnostics<br/>[diagnostics.py]"]
  node_codegen["HTML and ARIA<br/>[codegen.py]"]
  node_repair["Tab-order repair<br/>[autorepair.py]"]
end

subgraph group_parallel["KanaForge package"]
  node_k_analyzer["Accessibility analysis<br/>[analyzer.py]"]
  node_k_ast["Program AST<br/>[ast_nodes.py]"]
  node_k_parser["DSL parser<br/>[parser.py]"]
  node_k_profiles["Accessibility profiles<br/>[profiles.py]"]
  node_k_symbols["Semantic validation<br/>[symbol_table.py]"]
  node_k_states["State-space engine<br/>[state_space.py]"]
  node_k_repair["Tab-order repair<br/>[autorepair.py]"]
  node_k_cli["CLI commands<br/>[cli.py]"]
  node_k_codegen["HTML and ARIA<br/>[codegen.py]"]
  node_k_diagnostics["WCAG diagnostics<br/>[diagnostics.py]"]
  node_k_lexer["Tokenizer<br/>[lexer.py]"]
end

node_author(("DSL author"))

node_author -->|"provides DSL"| node_cli
node_cli -->|"parses source"| node_parser
node_parser -->|"tokenizes via"| node_lexer
node_parser -->|"builds AST"| node_ast
node_cli -->|"validates semantics"| node_symbols
node_symbols -->|"reads nodes"| node_ast
node_cli -->|"runs analysis"| node_analyzer
node_analyzer -->|"reads symbols"| node_symbols
node_analyzer -->|"uses state model"| node_states
node_analyzer -->|"reads program"| node_ast
node_analyzer -->|"applies profile"| node_profiles
node_analyzer -->|"creates findings"| node_diagnostics
node_cli -->|"formats report"| node_diagnostics
node_cli -->|"emits HTML"| node_codegen
node_codegen -->|"reads symbols"| node_symbols
node_cli -->|"runs repair"| node_repair
node_cli -->|"selects profile"| node_profiles
node_cli -->|"serves page"| node_studio
node_author -->|"uses editor"| node_studio
node_k_cli -->|"parses source"| node_k_parser
node_k_parser -->|"tokenizes via"| node_k_lexer
node_k_parser -->|"builds AST"| node_k_ast
node_k_cli -->|"validates semantics"| node_k_symbols
node_k_symbols -->|"reads nodes"| node_k_ast
node_k_cli -->|"runs analysis"| node_k_analyzer
node_k_analyzer -->|"reads symbols"| node_k_symbols
node_k_analyzer -->|"uses state model"| node_k_states
node_k_analyzer -->|"reads program"| node_k_ast
node_k_analyzer -->|"applies profile"| node_k_profiles
node_k_analyzer -->|"creates findings"| node_k_diagnostics
node_k_cli -->|"formats report"| node_k_diagnostics
node_k_cli -->|"emits HTML"| node_k_codegen
node_k_codegen -->|"reads symbols"| node_k_symbols
node_k_cli -->|"runs repair"| node_k_repair
node_k_cli -->|"selects profile"| node_k_profiles
node_k_diagnostics -->|"reuses diagnostics"| node_diagnostics

click node_cli "https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/a11ycc/cli.py"
click node_studio "https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/index.html"
click node_lexer "https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/a11ycc/lexer.py"
click node_parser "https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/a11ycc/parser.py"
click node_ast "https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/a11ycc/ast_nodes.py"
click node_symbols "https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/a11ycc/symbol_table.py"
click node_states "https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/a11ycc/state_space.py"
click node_analyzer "https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/a11ycc/analyzer.py"
click node_profiles "https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/a11ycc/profiles.py"
click node_diagnostics "https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/a11ycc/diagnostics.py"
click node_codegen "https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/a11ycc/codegen.py"
click node_repair "https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/a11ycc/autorepair.py"
click node_k_analyzer "https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/kanaforge/analyzer.py"
click node_k_ast "https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/kanaforge/ast_nodes.py"
click node_k_parser "https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/kanaforge/parser.py"
click node_k_profiles "https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/kanaforge/profiles.py"
click node_k_symbols "https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/kanaforge/symbol_table.py"
click node_k_states "https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/kanaforge/state_space.py"
click node_k_repair "https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/kanaforge/autorepair.py"
click node_k_cli "https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/kanaforge/cli.py"
click node_k_codegen "https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/kanaforge/codegen.py"
click node_k_diagnostics "https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/kanaforge/diagnostics.py"
click node_k_lexer "https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/kanaforge/lexer.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_studio toneBlue
class node_lexer,node_parser,node_ast toneAmber
class node_symbols,node_states,node_analyzer,node_profiles toneMint
class node_diagnostics,node_codegen,node_repair toneRose
class node_k_analyzer,node_k_ast,node_k_parser,node_k_profiles,node_k_symbols,node_k_states,node_k_repair,node_k_cli,node_k_codegen,node_k_diagnostics,node_k_lexer,node_author toneIndigo
```

## Components

### User entry

- [CLI commands](https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/a11ycc/cli.py): `a11ycc/cli.py`
- [Web Studio](https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/index.html): `index.html`

### DSL frontend

- [Tokenizer](https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/a11ycc/lexer.py): `a11ycc/lexer.py`
- [DSL parser](https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/a11ycc/parser.py): `a11ycc/parser.py`
- [Program AST](https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/a11ycc/ast_nodes.py): `a11ycc/ast_nodes.py`

### Verification

- [Semantic validation](https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/a11ycc/symbol_table.py): `a11ycc/symbol_table.py`
- [State-space engine](https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/a11ycc/state_space.py): `a11ycc/state_space.py`
- [Accessibility analysis](https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/a11ycc/analyzer.py): `a11ycc/analyzer.py`
- [Accessibility profiles](https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/a11ycc/profiles.py): `a11ycc/profiles.py`

### Compiler outputs

- [WCAG diagnostics](https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/a11ycc/diagnostics.py): `a11ycc/diagnostics.py`
- [HTML and ARIA](https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/a11ycc/codegen.py): `a11ycc/codegen.py`
- [Tab-order repair](https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/a11ycc/autorepair.py): `a11ycc/autorepair.py`

### KanaForge package

- [Accessibility analysis](https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/kanaforge/analyzer.py): `kanaforge/analyzer.py`
- [Program AST](https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/kanaforge/ast_nodes.py): `kanaforge/ast_nodes.py`
- [DSL parser](https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/kanaforge/parser.py): `kanaforge/parser.py`
- [Accessibility profiles](https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/kanaforge/profiles.py): `kanaforge/profiles.py`
- [Semantic validation](https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/kanaforge/symbol_table.py): `kanaforge/symbol_table.py`
- [State-space engine](https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/kanaforge/state_space.py): `kanaforge/state_space.py`
- [Tab-order repair](https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/kanaforge/autorepair.py): `kanaforge/autorepair.py`
- [CLI commands](https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/kanaforge/cli.py): `kanaforge/cli.py`
- [HTML and ARIA](https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/kanaforge/codegen.py): `kanaforge/codegen.py`
- [WCAG diagnostics](https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/kanaforge/diagnostics.py): `kanaforge/diagnostics.py`
- [Tokenizer](https://github.com/dharsanhunt/compiletimeaccessibilityverification/blob/main/kanaforge/lexer.py): `kanaforge/lexer.py`

### Other components

- **DSL author**

## Connections

- DSL author → CLI commands: provides DSL (evidence: `README.md`)
- CLI commands → DSL parser: parses source (evidence: `a11ycc/cli.py`)
- DSL parser → Tokenizer: tokenizes via (evidence: `a11ycc/parser.py`)
- DSL parser → Program AST: builds AST (evidence: `a11ycc/parser.py`)
- CLI commands → Semantic validation: validates semantics (evidence: `a11ycc/cli.py`)
- Semantic validation → Program AST: reads nodes (evidence: `a11ycc/symbol_table.py`)
- CLI commands → Accessibility analysis: runs analysis (evidence: `a11ycc/cli.py`)
- Accessibility analysis → Semantic validation: reads symbols (evidence: `a11ycc/analyzer.py`)
- Accessibility analysis → State-space engine: uses state model (evidence: `a11ycc/analyzer.py`)
- Accessibility analysis → Program AST: reads program (evidence: `a11ycc/analyzer.py`)
- Accessibility analysis → Accessibility profiles: applies profile (evidence: `a11ycc/analyzer.py`)
- Accessibility analysis → WCAG diagnostics: creates findings (evidence: `a11ycc/analyzer.py`)
- CLI commands → WCAG diagnostics: formats report (evidence: `a11ycc/cli.py`)
- CLI commands → HTML and ARIA: emits HTML (evidence: `a11ycc/cli.py`)
- HTML and ARIA → Semantic validation: reads symbols (evidence: `a11ycc/codegen.py`)
- CLI commands → Tab-order repair: runs repair (evidence: `a11ycc/cli.py`)
- CLI commands → Accessibility profiles: selects profile (evidence: `a11ycc/cli.py`)
- CLI commands → Web Studio: serves page (evidence: `a11ycc/cli.py`)
- DSL author → Web Studio: uses editor (evidence: `README.md`)
- CLI commands → DSL parser: parses source (evidence: `kanaforge/cli.py`)
- DSL parser → Tokenizer: tokenizes via (evidence: `kanaforge/parser.py`)
- DSL parser → Program AST: builds AST (evidence: `kanaforge/parser.py`)
- CLI commands → Semantic validation: validates semantics (evidence: `kanaforge/cli.py`)
- Semantic validation → Program AST: reads nodes (evidence: `kanaforge/symbol_table.py`)
- CLI commands → Accessibility analysis: runs analysis (evidence: `kanaforge/cli.py`)
- Accessibility analysis → Semantic validation: reads symbols (evidence: `kanaforge/analyzer.py`)
- Accessibility analysis → State-space engine: uses state model (evidence: `kanaforge/analyzer.py`)
- Accessibility analysis → Program AST: reads program (evidence: `kanaforge/analyzer.py`)
- Accessibility analysis → Accessibility profiles: applies profile (evidence: `kanaforge/analyzer.py`)
- Accessibility analysis → WCAG diagnostics: creates findings (evidence: `kanaforge/analyzer.py`)
- CLI commands → WCAG diagnostics: formats report (evidence: `kanaforge/cli.py`)
- CLI commands → HTML and ARIA: emits HTML (evidence: `kanaforge/cli.py`)
- HTML and ARIA → Semantic validation: reads symbols (evidence: `kanaforge/codegen.py`)
- CLI commands → Tab-order repair: runs repair (evidence: `kanaforge/cli.py`)
- CLI commands → Accessibility profiles: selects profile (evidence: `kanaforge/cli.py`)
- WCAG diagnostics → WCAG diagnostics: reuses diagnostics (evidence: `kanaforge/diagnostics.py`)
