Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Living wiki of UI design patterns and best practices built with Fumadocs, Next.js, and Base UI components.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
rules/a11y-visual-equivalent.md
1---2title: Visual Equivalent for Every Sound3impact: HIGH4tags: a11y, visual, sound5---67## Visual Equivalent for Every Sound89Every audio cue must have a visual equivalent; sound never replaces visual feedback.1011**Incorrect (sound without visual):**1213```tsx14function SubmitButton({ onClick }) {15const handleClick = () => {16playSound("success");17onClick();18};19}20```2122**Correct (sound with visual):**2324```tsx25function SubmitButton({ onClick }) {26const [status, setStatus] = useState("idle");2728const handleClick = () => {29playSound("success");30setStatus("success");31onClick();32};3334return <button data-status={status}>Submit</button>;35}36```37