passionfruit-a11y
Skill0 starsChanged 12 days agoMITView on GitHub
Use when adding or modifying any element with `aria-*`, `role=`, `alt=`, or any `<img>`, `<button>`, `<a>`, `<form>` element, or when touching motion-related files. Loads WCAG essentials, alt-text discipline, focus-visible patterns, touch-target rules, and the reduced-motion contract.
In this repository9 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- brandSkill
- deploySkill
- new-postSkill
- new-team-memberSkill
- onboardSkill
- passionfruit-contentSkill
- passionfruit-designSkill
- passionfruit-perfSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are 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.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Alt text on every image: Every <img> and Astro <Image> requires an alt attribute.
- Very specific: line 14
:focus-visiblering on every interactive element: Never suppress the default focus ring without providing a custom one. - Very specific: line 17
Labelled form fields: Every <input>, <select>, <textarea> has a <label> — visible or class="sr-only".
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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
passionfruit accessibility rules
Accessibility is enforced at build time — jsx-a11y/alt-text is error-level lint, so a missing alt blocks the build — and by convention everywhere else. These rules are non-negotiable. When in doubt, prefer the more accessible option.
Hard rules
- Alt text on every image. Every
<img>and Astro<Image>requires analtattribute.alt=""is correct ONLY when the image is purely decorative — it carries no information not already in surrounding text. Otherwise, describe what the image conveys, not what it visually looks like. - Touch targets ≥ 44px. Interactive elements (buttons, links, form inputs) must have at least 44×44px hit area, via CSS sizing or padding. This is a hard floor, not a target.
:focus-visiblering on every interactive element. Never suppress the default focus ring without providing a custom one. Keyboard users must be able to see where focus is.- Reduced-motion contract. Any CSS animation or transition exceeding 100ms must be wrapped in
@media (prefers-reduced-motion: no-preference). The default (outside that block) is the target state, applied instantly. No parallax. Ever. - Landmark roles for top-level structure.
<main>,<nav>,<header>,<footer>for top-level page structure — not generic<div>walls. State pages (404, 500) must wrap their content in<main>so screen readers can land on it. - Labelled form fields. Every
<input>,<select>,<textarea>has a<label>— visible orclass="sr-only". Error messages link to the field viaaria-describedby. No placeholder-as-label tricks. - Accent contrast.
--color-accentmust reach 4.5:1 on white, which the build enforces. It's tuned for light surfaces, so accent-colored text on dark surfaces usestext-accent-glow.
Common mistakes
<img>with noalt. Build fails. If decorative,alt=""— not the absence of the attribute.- Button-styled
<div>with norole="button", notabindex, no keyboard handler. Use<button>instead — you get keyboard, ARIA semantics, and focus styles for free. - Icon-only
<button>or<a>with noaria-label. The accessible name is missing — screen readers announce "button" with no purpose. Addaria-label="Open menu"(or similar). - Animation without a reduced-motion gate. Users with
prefers-reduced-motion: reduceget the unmitigated animation — motion-sickness territory. Wrap the keyframes in the media query; let the static end-state stand on its own. - Suppressing
outlinewithout replacing it.outline: noneon:focusstrips the only visible focus signal. If you must restyle, do it under:focus-visiblewith a clearly visible ring. - Skipped heading levels (
<h2>then<h4>). Heading hierarchy is the screen-reader's outline. Don't pick a level for size — pick the size token from--text-*.
Where to look
- This skill auto-loads on a11y-touching edits — read it first.
STYLE_GUIDE.md§8 (Accessibility) — fuller coverage including focus-ring tokens and the full touch-target rationale.passionfruit-contentskill — content-side accessibility (heading hierarchy in markdown, link text discipline, bilingual screen-reader copy).pnpm lint:a11y— runs the dedicated a11y ESLint pass locally. Run it when you've added a non-trivial interactive component.
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.

