frontend-accessibility
Skill4 starsChanged 5 months agoMITView on GitHub
Web accessibility patterns for WCAG 2.1 AA compliance including ARIA, keyboard navigation, screen reader support, contrast ratios, touch targets, design-token contrast safety, and Svelte-specific implementations. Use for accessibility audits, a11y implementation, ADA compliance, or inclusive design.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- Domenico-Tenace-Open-Labs/web-dev-agenttheir own version, first seen Nov 1, 2026
- lammersbjorn/sane-nexttheir own version, first seen May 8, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- Domenico-Tenace-Open-Labs/web-dev-agent★ 3same name
- lammersbjorn/sane-next★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository101 other files it gives its agents.
- ai-video-understandingSkill
- apple-foundation-modelsSkill
- arch-dddSkill
- arch-decision-recordsSkill
- arch-diagramsSkill
- arch-eventsSkill
- arch-mvp-roadmapSkill
- arch-python-modernSkill
- aws-app-runnerSkill
- aws-cicd-patternsSkill
- aws-security-hardeningSkill
- azure-functions-python-v2Skill
- azure-identity-m2m-authSkill
- azure-service-bus-messagingSkill
- azure-workflow-execution-modelsSkill
- caddy-tls-proxySkill
- compliance-frameworksSkill
- design-system-workflowSkill
- dev-debugging-strategiesSkill
- dev-standardsSkill
- docker-python-poetrySkill
- docker-pythonSkill
- fastapi-patternsSkill
- ffmpeg-laravel-videoSkill
- formik-yup-react-nativeSkill
- frontend-angular-aiSkill
- frontend-angularSkill
- frontend-angular-toolingSkill
- frontend-design-systemsSkill
- frontend-material-chatSkill
- frontend-material-design-3Skill
- frontend-svelteSkill
- gcp-cicd-patternsSkill
- gcp-cloud-runSkill
- gcp-cloudsql-infrastructureSkill
- gcp-finopsSkill
- gcp-observabilitySkill
- gcp-security-hardeningSkill
- github-actions-cicdSkill
- healthkit-biofeedbackSkill
- infra-terraformSkill
- ios-app-qualitySkill
- ios-audio-hapticsSkill
- jest-nestjs-testingSkill
- langchain-azure-openai-patternsSkill
- laravel-auth-hardeningSkill
- laravel-ci-mysqlSkill
- laravel-mix-webpackSkill
- laravel-modern-patternsSkill
- laravel-pint-patternsSkill
- laravel-s3-storageSkill
- laravel-sail-dockerSkill
- mobile-app-deploymentSkill
- mobile-e2e-testingSkill
- mobile-offline-syncSkill
- mobile-push-notificationsSkill
- mobile-video-uploadSkill
- mongodb-asyncmongoclient-patternsSkill
- mongodb-atlas-patternsSkill
- nestjs-patternsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 41
Use :focus-visible over :focus — only shows for keyboard navigation
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Frontend Accessibility Patterns
WCAG 2.1 AA compliance patterns for modern web applications.
Core Principles (POUR)
| Principle | Description |
| Perceivable | Information presentable in ways users can perceive |
| Operable | Interface components operable by all users |
| Understandable | Information and operation understandable |
| Robust | Works with current and future technologies |
Keyboard Navigation
- Tab/Shift+Tab: Navigate interactive elements
- Enter/Space: Activate buttons/links
- Escape: Close modals/dropdowns
- Arrow keys: Navigate lists/menus
Color Contrast (WCAG AA)
- Normal text: 4.5:1 minimum
- Large text (18pt+): 3:1 minimum
- Interactive elements: 3:1 minimum
Common fix: maintain hue, reduce HSL lightness ~20% (e.g. #ef4444 → #c53030). See reference.md → Color Contrast for the safe-combinations table and dark-mode re-validation guidance.
Focus Management
- Visible focus indicators (
outline: nonewithout alternative removes keyboard discoverability) - Use
:focus-visibleover:focus— only shows for keyboard navigation - Trap focus in modals, return focus on close
- Manage focus on route changes
Motion and Animation
CSS animations include prefers-reduced-motion overrides (WCAG 2.1 AAA criterion 2.3.3 — vestibular disorder risk).
Touch Targets
WCAG 2.5.5 requires interactive elements to have min-width: 44px; min-height: 44px. Common violations: .btn-sm (36px), .btn-icon (28px), .copy-btn (32px). Padding alone can produce heights under 44px (e.g., padding: 0.625rem = ~42.5px) — explicit min-height: 44px prevents the under-44px result.
Name, Role, Value (WCAG 4.1.2) — Conditional Role
Apply a landmark or group role only when an accessible name is present. role={label ? "group" : undefined} — a role with aria-labelledby={undefined} exposes a nameless region that adds nothing to the a11y tree and can mislead AT users.
Testable touch-target contract: stamp data-wcag-touch-target="44" on sized elements so unit tests assert WCAG intent without computing layout (jsdom cannot measure rendered size). Test: expect(el).toHaveAttribute('data-wcag-touch-target', '44').
See reference.md → Conditional Role and Testable Contract for code examples and axe-core rule details.
Design Token Contrast Safety
var(--text-muted) (~4.48:1 at #718096) lands under WCAG AA's 4.5:1 minimum for body copy below 18px — not safe to default for body text; var(--text-secondary) (~7:1) is safe for all sizes. Without a paired override, body text on a dark section fails WCAG AA 4.5:1 contrast.
See reference.md → Design Token Contrast Safety for the full contrast-ratio table and the dark-section override pattern.
Checklists
Pre-flight CSS (token validation, contrast, hover-affordance) and pre-placement audit (section rhythm, card-variant reuse, token palette) — see reference.md → Pre-Flight CSS Checklist and Pre-Placement Audit for the full checklists.
Stretched-Link Cards (Single Tab Stop)
A card with both a title link and a "read more" link creates two tab stops for one destination. Collapse to one via ::after overlay on the title link; render "read more" as aria-hidden="true" <span>. See reference.md → Stretched-Link Cards for the CSS pattern and Playwright pointer-interception verification.
Common Mistakes
- Missing
alton images - Form inputs without labels
- Color as only indicator
- Mouse-only interactions
- Missing skip links
- Auto-playing media
- Conflicting visual states (e.g., "featured" and "selected" using same indicator)
.sr-onlydefined per-component instead of global styles
See reference.md → Common Mistakes — Extended for Retina 2x source-size and <dt>/<dd> ordering items.
See reference.md for the Interactive Component Checklist, full WCAG 2.1 AA criteria tables, testing tools, ARIA roles reference, Shadow DOM accessibility, and dark mode contrast details.
See examples.md for Svelte 5 accessible components (button, modal, form input, chat message list, typing indicator, connection status, skip link, focus trap utility, Web Component a11y), progressive disclosure HTML/CSS, and decorative element patterns.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

