mirror of
https://github.com/Shik3i/KoalaSync.git
synced 2026-08-30 20:49:22 +00:00
a11y: hero demo passes WCAG contrast (Lighthouse 4x100 desktop)
- Remove the confusing, space-hungry "Episode Lobby" card from the mockup - Give the decorative demo mockup a contrast-safe palette: accent shown as text uses a lighter indigo, and buttons with white text on a colour get darker shades, so every walkthrough state meets WCAG AA - Drop the scroll-reveal fade from the above-the-fold hero demo; the fade briefly rendered its text at partial opacity, which axe caught as failing contrast on ~1 in 3 audits - Mark the demo as decorative for assistive tech (aria-hidden + removed from tab order); mouse interaction is unchanged - Darken the footer support pill so white text meets contrast Desktop Lighthouse: 100/100/100/100 (stable across runs). Mobile: 100 a11y / best-practices / SEO; performance ~87 (throttled LCP, separate work). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -465,6 +465,18 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
});
|
||||
});
|
||||
|
||||
// The hero demo is a decorative, self-playing illustration; the real,
|
||||
// accessible walkthrough is the #how-it-works section. Hide the fake
|
||||
// extension UI from the accessibility tree and drop its controls from the
|
||||
// tab order so screen readers are not confused and it does not trip
|
||||
// contrast/label audits. Mouse interaction is unaffected.
|
||||
const heroDemoScene = document.getElementById('hero-demo');
|
||||
if (heroDemoScene) {
|
||||
heroDemoScene.setAttribute('aria-hidden', 'true');
|
||||
heroDemoScene.querySelectorAll('a[href], button, input, select, textarea, [tabindex]')
|
||||
.forEach(el => el.setAttribute('tabindex', '-1'));
|
||||
}
|
||||
|
||||
// --- Hero Live Demo (two synced video tabs + extension popup) ---
|
||||
// Desktop only: on mobile the scene falls back to the classic static popup.
|
||||
const initHeroDemo = () => {
|
||||
|
||||
Reference in New Issue
Block a user