Autoplay is controversial. Implement carefully.
Accessibility requirements:
- Must have visible pause/play control
- Pause on hover and focus
- Respect prefers-reduced-motion
- Don't autoplay by default
Implementation:
useEffect(() => {
if (!autoPlay || isPaused) return;
const timer = setInterval(goToNext, interval);
return () => clearInterval(timer);
}, [autoPlay, isPaused, interval]);
UX tip: Autoplay works for ambient content (hero banners). Avoid for content users need to read or interact with.