accessible-components
Skill2 starsChanged 3 months agoMITView on GitHub
Patterns for building reusable, accessible, production-grade React/TypeScript UI components. Use this whenever you create or review a UI component, build a form, design a component API, or work on the frontend — even if accessibility isn't explicitly mentioned. Covers state handling, a11y, responsiveness, and prop design.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- yogvidwankhede/vishwakarmatheir own version, first seen Sep 26, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- yogvidwankhede/vishwakarma★ 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 repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- clean-architectureSkill
- production-readinessSkill
- accessible-componentsSkill
- clean-architectureSkill
- production-readinessSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Never build only the success state.
- Distinctive: line 23
If a component fetches data, all four are required.
- Very specific: line 32
Labels & names: Every input has an associated <label>.
- Distinctive: line 34
ARIA only when HTML can't: Prefer native semantics; reach for ARIA roles/states for custom widgets (modals, tabs, comboboxes) and manage …
- Very specific: line 43
Composition over configuration: Prefer children and slots over a dozen boolean flags.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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
Production-grade React components
A component is "done" when it handles the messy real world, not just the happy path.
Every component must handle all four states
Never build only the success state. Explicitly handle:
- Loading — show a skeleton or spinner; don't leave a blank flash.
- Empty — a real "nothing here yet" state with guidance, not an empty
<div>. - Error — a recoverable message; never a silent failure or a crash.
- Success — the actual content.
If a component fetches data, all four are required. Reviewers should reject any that only renders the success case.
Accessibility (non-negotiable, build it in from the start)
- Semantic HTML first. A
<button>is a button. Don't make<div onClick>when a native element exists — you lose keyboard and screen-reader support for free. - Keyboard operable. Everything clickable must be reachable and usable with Tab /
Enter / Space / Esc. Visible focus styles — never
outline: nonewith no replacement. - Labels & names. Every input has an associated
<label>. Icon-only buttons get anaria-label. Images get meaningfulalt. - ARIA only when HTML can't. Prefer native semantics; reach for ARIA roles/states for custom widgets (modals, tabs, comboboxes) and manage focus correctly.
- Color isn't the only signal. Pair color with text/icon; check contrast (WCAG AA).
- Announce dynamic changes (loading, errors) via
aria-livewhere appropriate.
Reusability & API design
- Props are a contract. Type them precisely; required vs optional is meaningful. Provide sensible defaults so the common case is one line.
- Composition over configuration. Prefer
childrenand slots over a dozen boolean flags. If a component has 15 props, it's probably two components. - Controlled vs uncontrolled — pick one deliberately and document it.
- Don't hardcode spacing/colors; use design tokens / theme variables.
- No business logic inside presentational components — pass data and callbacks in.
Responsiveness
- Mobile-first; test at small, medium, large widths.
- Fluid layouts (flex/grid) over fixed pixel widths.
- Touch targets large enough to tap (~44px); don't rely on hover for essential actions.
Deliver with the component
- Props/API table (name, type, default, purpose).
- Usage example(s) — the common case and one edge case.
- The four states demonstrated.
Quick review checklist
- Loading / empty / error / success all handled
- Keyboard operable with visible focus
- Labels / alt / accessible names present
- Types precise; sensible defaults
- No business logic baked in; reusable
- Responsive; tokens not magic numbers
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.

