--- name: web-performance-seo description: Fix PageSpeed Insights/Lighthouse accessibility "!" errors caused by contrast audit failures (CSS filters, OKLCH/OKLAB, low opacity, gradient text, image backgrounds). Use for accessibility-driven SEO/performance debugging and remediation. --- # Web Performance SEO: Accessibility Contrast Error Fix ## When to use - PSI/Lighthouse accessibility shows "!" or error instead of a numeric score - color-contrast audit errors or getImageData failures - Need to improve accessibility signals that impact SEO ## Workflow 1. Reproduce - Run Lighthouse or PSI; capture failing audit names. 2. Scan code for common triggers - CSS filters/backdrop blur, mix-blend-mode - OKLCH/OKLAB colors - Low opacity backgrounds (< 0.4) - Gradient text with color: transparent - Text over images without opaque overlays 3. Fix in priority order - Remove filters/blend modes - Convert OKLCH/OKLAB to HSL/RGB - Raise opacity thresholds - Add solid-color fallback for gradient text - Add overlay behind text on images 4. Verify locally with Lighthouse/axe 5. Verify in PSI after deployment ## Fast scan commands ```bash rg -n "backdrop-blur|filter:|mix-blend-mode" . rg -n "oklch|oklab" . rg -n "/10|/20|/30|opacity-25|opacity-0" . rg -n "background-clip.*text|color.*transparent" . ``` ## Fix patterns ### Remove filters (critical) ```tsx // Before