sicua
Version:
A tool for analyzing project structure and dependencies
81 lines (80 loc) • 2.49 kB
TypeScript
/**
* Main accessibility analyzer class that orchestrates the entire analysis process
* Updated to work with enhanced ScanResult and project structure detection
*/
import { ComponentRelation, ScanResult } from "../../types";
import { ComponentA11yInfo, AccessibilityAnalysis, AccessibilityViolation } from "./types/accessibilityTypes";
export declare class AccessibilityAnalyzer {
private scanResult;
private components;
private componentA11yInfo;
constructor(scanResult: ScanResult, components: ComponentRelation[]);
/**
* Main analysis method that produces complete accessibility analysis
*/
analyze(): Promise<AccessibilityAnalysis>;
/**
* Analyze all components for accessibility violations
*/
private analyzeComponents;
/**
* Analyze a single component for accessibility issues using enhanced validators
*/
private analyzeComponent;
/**
* Run enhanced validations with proper context support
*/
private runEnhancedValidations;
/**
* Run validations that require multiple elements
*/
private runMultiElementValidations;
/**
* Calculate accessibility score for a component (0-100)
*/
private calculateComponentScore;
/**
* Generate summary metrics for the analysis
*/
private generateSummary;
/**
* Generate rule-based breakdown of violations
*/
private generateRuleViolations;
/**
* Generate component-level violation details
*/
private generateComponentViolations;
/**
* Generate patterns and insights from the analysis
*/
private generatePatterns;
/**
* Get all violations from all components
*/
private getAllViolations;
/**
* Get component name for a violation (for tracking purposes)
*/
private getComponentNameForViolation;
/**
* Extract directory from file path
*/
private getDirectoryFromPath;
/**
* Assess WCAG compliance level based on violations
*/
private assessWCAGCompliance;
/**
* Get detailed component information for a specific component
*/
getComponentInfo(componentName: string): ComponentA11yInfo | undefined;
/**
* Get violations for a specific rule across all components
*/
getViolationsForRule(ruleId: string): AccessibilityViolation[];
/**
* Get components that have no accessibility violations
*/
getCleanComponents(): string[];
}