diff --git a/.claude/skills/aria/references/anti-patterns.md b/.claude/skills/aria/references/anti-patterns.md index b7c1d8bf..8c80ec1d 100644 --- a/.claude/skills/aria/references/anti-patterns.md +++ b/.claude/skills/aria/references/anti-patterns.md @@ -215,6 +215,22 @@ Information must not rely on color alone (WCAG 1.4.1). ### No Reduced Motion Support +It's not always required to completely nuke transitions/animations. Sometimes we can instead reduce their duration and delay. People enabling reduced motion often still benefit from some transition - it helps orientation and avoids jarring state changes. + +```css +--transition-duration: 200ms; +--animation-duration: 200ms; + +@media (prefers-reduced-motion: reduce) { + .popup { + --transition-duration: 50ms; + --animation-duration: 50ms; + } +} +``` + +Remove non-essential motion - e.g. parallax, large transforms, bouncing, zooming, auto-playing animations. + ```css .element { animation: bounce 1s infinite; diff --git a/.claude/skills/aria/references/media.md b/.claude/skills/aria/references/media.md index 42766d6a..ef443e17 100644 --- a/.claude/skills/aria/references/media.md +++ b/.claude/skills/aria/references/media.md @@ -19,8 +19,8 @@ Accessibility patterns specific to video and audio players. Covers controls, key The root player element needs proper identification: ```html -
@@ -29,6 +29,7 @@ The root player element needs proper identification: ``` **Attributes:** + - `role="region"` or `role="application"` (if fully keyboard-managed) - `aria-label` includes media type and title - `tabindex="-1"` allows programmatic focus @@ -57,6 +58,7 @@ The root player element needs proper identification: ### Key Scope Configure whether shortcuts work: + - **Document-wide**: Work anywhere on page (YouTube-style) - **Player-scoped**: Only when player has focus @@ -82,6 +84,7 @@ Use toolbar pattern with roving tabindex: ``` **Navigation:** + - `Tab` enters/exits toolbar (single stop) - `←` `→` moves between controls - `Enter`/`Space` activates control @@ -123,6 +126,7 @@ aria-orientation="horizontal" ``` **Key behavior:** + - `←` `→`: Seek by step (5 seconds) - `PageUp` `PageDown`: Seek by large step (10%) - `Home` `End`: Start/end of video @@ -166,8 +170,8 @@ aria-keyshortcuts="c" ### Menu Structure ```html -