Initial commit

This commit is contained in:
Michael-A-Sloan committed 2026-08-02 16:12:17 -04:00
commit 3a1960d860
51 files changed
+3395

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
---
description: Web accessibility (a11y) — WCAG 2.1 AA patterns
globs: **/*.{tsx,jsx,vue,svelte,html}
alwaysApply: false
---
# Accessibility (a11y)
- Use semantic HTML: `<button>` for actions, `<a>` for navigation, `<main>`, `<nav>`, headings in order.
- Every interactive element must be keyboard reachable and show a visible focus state.
- Images need meaningful `alt` text. Decorative images use `alt=""`.
- Form inputs require associated `<label>` or `aria-label`. Group related fields with `<fieldset>`.
- Color alone must not convey meaning — pair with text, icons, or patterns.
- Minimum contrast ratio 4.5:1 for normal text, 3:1 for large text (WCAG AA).
- Modals: trap focus, restore focus on close, support Escape to dismiss.
- Use `aria-live` regions for dynamic status updates (toasts, loading, errors).
- Do not remove focus outlines without providing an equivalent custom focus style.