# dequelabs/axe-core architecture

> Architecture diagram of the GitHub repository dequelabs/axe-core, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dequelabs/axe-core
- Repository: https://github.com/dequelabs/axe-core

## Overview

##### Main Components Overview

a. Core Engine Layer:
- Rule Engine (lib/core)
- Check Engine (lib/checks)
- Commons Utilities (lib/commons)
- Standards Implementation (lib/standards)

b. Integration Layer:
- API Interface (lib/core/public)
- Reporter System (lib/core/reporters)
- Frame Messenger (lib/core/utils/frame-messenger)
- Virtual DOM Implementation (lib/core/base/virtual-node)

c. Rules & Checks Layer:
- Accessibility Rules (lib/rules)
- Check Implementations (lib/checks)
- Rule Matches (test/rule-matches)

##### Component Relationships

**[API Interface] → [Core Engine]**
**[Core Engine] → [Rules & Checks Layer]**
**[Core Engine] → [Virtual DOM]**
**[Frame Messenger] ↔ [Core Engine]**
**[Reporter System] ← [Core Engine]**
**[Commons Utilities] ← [All Components]**

##### Data Flow Representation

Flow of accessibility testing:
**[Web Page/Application] → [Virtual DOM] → [Rule Engine] → [Check Engine] → [Reporter System] → [Test Results]**

##### Key Integration Points

External integration capabilities:
- Browser Integration
- Test Framework Integration
- CI/CD Integration
- Frame Communication

##### Specific Implementation Details

- Supported Standards (WCAG 2.0, 2.1, 2.2)
- Localization Support
- Browser Compatibility
- Rule Categories

##### Technical Specifications

Annotations for:
- JavaScript-based implementation
- Cross-browser support
- Shadow DOM support
- iframe handling

##### Notes Section

Important details about:
- Zero false positives philosophy
- Automated vs manual checks
- Configuration options
- Performance considerations

##### Version Information

A section showing:
- Current version
- Support timeline
- Update frequency
- Security considerations

- Modularity of the system
- Extensibility points
- Security features
- Performance optimization points
- Integration capabilities

Remember to:
- Clear boundaries between components
- Critical paths and dependencies
- Error handling flows
- Scalability considerations

## Diagram (Mermaid)

```mermaid
%%{init: {'theme': 'base', 'themeVariables': { 'fontSize': '16px'}}}%%

flowchart TB
    subgraph Integration
        API["API Interface"]
        FM["Frame Messenger"]
        TI["Test Integration"]
        RP["Reporter System"]
    end

    subgraph Core["Core Engine Layer"]
        CE["Core Engine"]
        RE["Rule Engine"]
        CHE["Check Engine"]
        VD["Virtual DOM"]
        CS["Context System"]
    end

    subgraph Rules["Rules & Checks Layer"]
        AR["Accessibility Rules"]
        CI["Check Implementations"]
        RM["Rule Matches"]
    end

    subgraph Support["Support Layer"]
        CU["Commons Utilities"]
        SI["Standards Implementation"]
        SO["Standards Objects"]
    end

    %% Core relationships
    API --> CE
    CE --> RE
    CE --> CHE
    CE --> VD
    CE --> CS
    FM <--> CE
    CE --> RP

    %% Rules relationships
    RE --> AR
    CHE --> CI
    AR --> RM

    %% Support relationships
    CU --> CE
    CU --> RE
    CU --> CHE
    SI --> CE
    SO --> SI

    %% Integration relationships
    TI --> API
    
    %% Styling
    classDef core fill:#2374ab
    classDef integration fill:#45b7d1
    classDef rules fill:#f4845f
    classDef support fill:#98c1d9
    
    class CE,RE,CHE,VD,CS core
    class API,FM,TI,RP integration
    class AR,CI,RM rules
    class CU,SI,SO support

    %% Click events
    click CE "https://github.com/dequelabs/axe-core/blob/develop/lib/core/core.js"
    click CHE "https://github.com/dequelabs/axe-core/blob/develop/lib/checks/index.js"
    click CU "https://github.com/dequelabs/axe-core/tree/develop/lib/commons/"
    click SI "https://github.com/dequelabs/axe-core/tree/develop/lib/standards/"
    click API "https://github.com/dequelabs/axe-core/tree/develop/lib/core/public/"
    click RP "https://github.com/dequelabs/axe-core/tree/develop/lib/core/reporters/"
    click FM "https://github.com/dequelabs/axe-core/tree/develop/lib/core/utils/frame-messenger/"
    click VD "https://github.com/dequelabs/axe-core/tree/develop/lib/core/base/virtual-node/"
    click AR "https://github.com/dequelabs/axe-core/tree/develop/lib/rules/"
    click CI "https://github.com/dequelabs/axe-core/tree/develop/lib/checks/"
    click RM "https://github.com/dequelabs/axe-core/tree/develop/test/rule-matches/"
    click RE "https://github.com/dequelabs/axe-core/blob/develop/lib/core/base/rule.js"
    click CS "https://github.com/dequelabs/axe-core/tree/develop/lib/core/base/context/"
    click TI "https://github.com/dequelabs/axe-core/tree/develop/test/integration/"
    click SO "https://github.com/dequelabs/axe-core/blob/develop/lib/standards/index.js"
```
