ov.analysis.ux.contrast_focus#
Contrast + focus analyzer (deterministic, no engine).
Contrast ratios are computed from the captured a11y_styles artifact (effective
fg/bg colors) with the exact WCAG relative-luminance formula and the 4.5:1 normal
/ 3:1 large+UI thresholds (D3 §3). Focus issues that are statically detectable
(positive tabindex) are flagged from the DOM; the genuinely behavioral focus
properties (keyboard traps, focus-order logicality, visible-focus indicator)
need active key-driving and are routed to needs_human_review rather than
asserted – the honesty constraint again.
Functions
Emit contrast Findings + statically-detectable focus Findings. |
|
|
WCAG contrast ratio between two sRGB colors (>=1.0). |
|
WCAG relative luminance of an sRGB |
- ov.analysis.ux.contrast_focus.analyze_contrast_focus(ctx)[source]#
Emit contrast Findings + statically-detectable focus Findings.
- Return type: