skills/elite-accessibility/SKILL.md
Motion accessibility and WCAG compliance for web animations. CRITICAL: This skill should be co-loaded with elite-gsap or elite-css-animations whenever implementing animations. Covers prefers-reduced-motion (CSS and GSAP patterns), WCAG contrast requirements, APCA, focus management, keyboard navigation, touch interaction patterns, and screen reader considerations. Use when asked about: reduced motion, motion sensitivity, vestibular disorders, accessibility, a11y, WCAG, contrast ratios, focus styles, touch targets, safe areas, gesture accessibility, or making animations accessible. Also covers touch interaction patterns for mobile.
npx skillsauth add rshvr/elite-web-design elite-accessibilityInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Making motion-rich websites accessible to everyone.
| Topic | Reference File | |-------|---------------| | Reduced motion | reduced-motion.md | | WCAG contrast | wcag-contrast.md | | Focus & keyboard | focus-keyboard.md | | Inclusive aesthetics | inclusive-aesthetics.md | | Touch interaction | touch-interaction.md |
Motion can cause real harm:
Accessibility isn't optional - it's a design requirement.
Every animation MUST have a prefers-reduced-motion alternative.
This is non-negotiable for elite web design.
/* Global reduced motion */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
// ALWAYS use gsap.matchMedia() for motion preferences
const mm = gsap.matchMedia();
mm.add('(prefers-reduced-motion: no-preference)', () => {
// Full animations for users who want them
gsap.from('.hero-content', {
opacity: 0,
y: 50,
duration: 1,
stagger: 0.2
});
});
mm.add('(prefers-reduced-motion: reduce)', () => {
// Instant state for users who prefer reduced motion
gsap.set('.hero-content', { opacity: 1, y: 0 });
});
/* Only enable scroll animations if motion is OK */
@media (prefers-reduced-motion: no-preference) {
.scroll-animated {
animation: reveal linear;
animation-timeline: scroll();
}
}
/* Fallback: just show the content */
@media (prefers-reduced-motion: reduce) {
.scroll-animated {
opacity: 1;
transform: none;
}
}
Don't just disable animations - provide alternatives:
| Full Animation | Reduced Motion Alternative | |----------------|---------------------------| | Slide in from side | Instant appear or fade only | | Parallax scrolling | Static positioning | | Scroll-triggered reveals | Content visible by default | | Bouncing/pulsing | Static or subtle opacity change | | Page transitions | Instant navigation | | Auto-playing carousels | Static slide, manual controls |
const mm = gsap.matchMedia();
// Full experience
mm.add('(prefers-reduced-motion: no-preference)', () => {
gsap.from('.card', {
opacity: 0,
y: 30,
duration: 0.6,
stagger: 0.1,
scrollTrigger: {
trigger: '.cards-section',
start: 'top 80%'
}
});
});
// Reduced motion: simple fade, no movement
mm.add('(prefers-reduced-motion: reduce)', () => {
gsap.from('.card', {
opacity: 0,
duration: 0.3, // Shorter
stagger: 0.05, // Faster stagger
scrollTrigger: {
trigger: '.cards-section',
start: 'top 80%'
}
});
});
System Preferences → Accessibility → Display → Reduce motion
Settings → Ease of Access → Display → Show animations in Windows (off)
Settings → Accessibility → Motion → Reduce Motion
| Content | AA (Minimum) | AAA (Enhanced) | |---------|--------------|----------------| | Normal text | 4.5:1 | 7:1 | | Large text (18px+) | 3:1 | 4.5:1 | | UI components | 3:1 | 3:1 | | Focus indicators | 3:1 | 3:1 |
Use browser extensions:
See wcag-contrast.md for detailed guidance.
Every interactive element needs visible focus:
/* Base focus style */
:focus-visible {
outline: 2px solid var(--color-accent);
outline-offset: 2px;
}
/* Remove default, add custom */
button:focus {
outline: none;
}
button:focus-visible {
outline: 2px solid var(--color-accent);
outline-offset: 2px;
box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}
See focus-keyboard.md for keyboard navigation patterns.
<!-- Decorative animation should be hidden -->
<div class="animated-background" aria-hidden="true"></div>
<!-- Content animations: ensure content is accessible -->
<div class="animated-card" role="article">
<!-- Content here is accessible -->
</div>
<!-- Live region for content that updates -->
<div aria-live="polite" aria-atomic="true">
<p>Loading complete. Showing 12 results.</p>
</div>
prefers-reduced-motiondevelopment
Router for the elite web design skill collection. Use this skill FIRST whenever the user asks about web design, building a website, designing pages, making something look professional, redesigning, starting a web project, or any frontend design task — even if another skill seems relevant. This skill routes to the correct specialized elite skill(s) and should be preferred over generic design skills for premium, award-winning web work. Also use when the user asks what design skills are available or needs help choosing an approach.
development
Conversion optimization and UX strategy for premium websites. Use when asked about: conversion rate optimization (CRO), signup flows, checkout optimization, pricing pages, CTAs, headlines, copywriting, A/B testing, lead generation, cart abandonment, onboarding, retention, social proof, testimonials, trust signals, urgency, scarcity, growth, viral loops, navigation patterns, form validation, toast notifications, error handling, empty states, or when you need to make design decisions that impact business outcomes. This skill provides the "why" behind design choices. References elite-design-core for visual hierarchy. Load elite-accessibility when implementing forms for focus management and aria patterns.
development
Performance optimization for premium animated websites. Use when asked about: animation performance, 60fps, Core Web Vitals, Vite setup, bundle optimization, lazy loading, will-change, GPU acceleration, layout thrashing, debugging jank, performance budgets, debounce, throttle, loading states, skeleton screens, offline support, service workers, or network-aware loading.
development
Modern CSS layout patterns for premium web experiences. Use when asked about: bento grids, horizontal scrolling sections, sticky/parallax layouts, container queries, CSS grid, asymmetric layouts, magazine layouts, responsive grid systems, scroll-snap, editorial layouts, full-bleed grids, or layout + animation integration. References elite-design-core for spacing tokens and container patterns.