/** * WCAG color contrast checker. * * Evaluates text contrast ratios against backgrounds for all visible text elements. * Reports elements that fail WCAG 2.1 AA (4.5:1 for normal text, 3:1 for large text) * or AAA (7:1 for normal, 4.5:1 for large text) requirements. * * Uses computedStyle to get actual rendered colors — accounts for CSS variables * and inheritance. */ import type { Page } from 'playwright'; export interface ContrastViolation { selector: string; text: string; foreground: string; background: string; ratio: number; required: number; level: 'AA' | 'AAA'; isLargeText: boolean; severity: 'fail' | 'warn'; } export interface ContrastAuditResult { url: string; violations: ContrastViolation[]; passCount: number; score: number; auditedAt: string; } export declare function auditColorContrast(page: Page, url: string): Promise;