Skip to content
Development
Skill

/accessibility

Reviews accessibility including WCAG, ARIA, keyboard navigation. Use when junior builds forms, buttons, modals, interactive elements, or asks "is this accessible", "a11y", "screen reader".

From plugin
ownyourcode
29318 skills12 commands

Claude Code

$ npx -y skills add DanielPodolsky/ownyourcode --skill accessibility --agent claude-code

SKILL.md

accessibility.SKILL.md
name: accessibility-fundamentals
description: Reviews accessibility including WCAG, ARIA, keyboard navigation. Use when junior builds forms, buttons, modals, interactive elements, or asks "is this accessible", "a11y", "screen reader".

Accessibility Fundamentals Review

> "Accessibility is not a feature, it's a requirement. If 15% of users can't use your app, you've failed 15% of users."

When to Apply

Activate this skill when:

  • Reviewing JSX with buttons, links, or forms
  • Seeing custom interactive components
  • Forms with inputs and labels
  • Navigation menus
  • Modal dialogs
  • Any user interaction code

---

The Accessibility Checklist

Must Have (Every Interactive Element)

  • [ ] **Keyboard accessible** — All actions work with Tab + Enter/Space
  • [ ] **Focus visible** — Clear visual indicator of focused element
  • [ ] **Semantic elements** — `<button>` not `<div onClick>`
  • [ ] **Form labels** — Every input has an associated `<label>`
  • [ ] **Alt text** — Images have descriptive alt attributes
  • [ ] **Sufficient contrast** — Text readable against background (4.5:1 ratio)

Should Have (Complex Interactions)

  • [ ] **ARIA labels** — Icon-only buttons have `aria-label`
  • [ ] **Focus trapping** — Modals trap focus until closed
  • [ ] **Skip links** — "Skip to main content" for keyboard users
  • [ ] **Live regions** — Dynamic content announced to screen readers
  • [ ] **Error messages** — Linked to inputs with `aria-describedby`

Never Do

  • [ ] **Rely on color alone** — Color should not be the only indicator
  • [ ] **Remove focus outlines** — Never `outline: none` without replacement
  • [ ] **Use divs for buttons** — Use semantic `<button>` or `<a>`
  • [ ] **Trap users** — Always provide escape from modals/menus

---

Common Mistakes (Anti-Patterns)

1. Div as Button

// ❌ BAD: Not keyboard accessible, no semantics
<div onClick={handleClick} className="button">
  Click me
</div>

// ✅ GOOD: Native button element
<button onClick={handleClick} className="button">
  Click me
</button>

**Why it matters:** `<div onClick>` doesn't receive keyboard focus, doesn't respond to Enter/Space, and isn't announced as a button by screen readers.

2. Missing Form Labels

// ❌ BAD: Input has no label
<input type="email" placeholder="Email" />

// ✅ GOOD: Label linked to input
<label htmlFor="email">Email</label>
<input id="email" type="email" placeholder="example@email.com" />

// ✅ ALSO GOOD: Wrapping label
<label>
  Email
  <input type="email" />
</label>

3. Icon-Only Buttons

// ❌ BAD: No accessible name
<button onClick={handleDelete}>
  <TrashIcon />
</button>

// ✅ GOOD: ARIA label for screen readers
<button onClick={handleDelete} aria-label="Delete item">
  <TrashIcon aria-hidden="true" />
</button>

4. Removed Focus Styles

/* ❌ BAD: Focus invisible */
button:focus {
  outline: none;
}

/* ✅ GOOD: Custom but visible focus */
button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.6);
}

/* ✅ BEST: Use focus-visible */
button:focus-visible {
  outline: 2px solid #4299e1;
  outline-offset: 2px;
}

5. Non-Descriptive Link Text

// ❌ BAD: "Click here" tells screen reader nothing
<p>
  To read our privacy policy, <a href="/privacy">click here</a>.
</p>

// ✅ GOOD: Link text describes destination
<p>
  Read our <a href="/privacy">privacy policy</a>.
</p>

6. Missing Heading Hierarchy

// ❌ BAD: Screen reader can't navigate
<div className="title">Welcome</div>
<div className="subtitle">Getting Started</div>

// ✅ GOOD: Proper headings
<h1>Welcome</h1>
<h2>Getting Started</h2>

---

Socratic Questions

Ask these instead of giving answers:

1. **Keyboard**: "Can you complete this action using only the keyboard?" 2. **Focus**: "If I tab through the page, can I see where I am?" 3. **Semantics**: "What does a screen reader announce for this element?" 4. **Labels**: "If the placeholder disappears, how do users know what to enter?" 5. **Color**: "If someone is colorblind, can they still understand this UI?" 6. **Alt Text**: "If the image doesn't load, what context is lost?"

---

Testing Accessibility

Manual Testing

1. **Keyboard test**: Navigate entire page with Tab only 2. **Focus test**: Can you always see where focus is? 3. **Zoom test**: Does layout break at 200% zoom? 4. **Screen reader**: Try VoiceOver (Mac) or NVDA (Windows)

Automated Testing

# In your test file
# Pattern: axe-core for React Testing Library
import { axe } from 'jest-axe';

it('should have no a11y violations', async () => {
  const { container } = render(<YourComponent />);
  const results = await axe(container);
  expect(results).toHaveNoViolations();
});

---

ARIA Reference

Common ARIA Attributes

| Attribute | Use Case | |-----------|----------| | `aria-label` | Provides name for icon-only buttons | | `aria-labelledby` | Points to element with visible label | | `aria-describedby` | Points to description (error messages) | | `aria-hidden="true"` | Hides decorative icons from screen readers | | `aria-expanded` | Indicates dropdown/accordion state | | `aria-live` | Announces dynamic content changes | | `role` | Defines element's purpose (use sparingly) |

The First Rule of ARIA

> "No ARIA is better than bad ARIA."

Use semantic HTML first. Only use ARIA when HTML can't express what you need.

---

Stack-Specific Guidance

React

// Pattern: Button with accessible name
<button
  onClick={handleAction}
  aria-label="Close modal"
>
  <XIcon aria-hidden="true" />
</button>

Form Error Pattern

// Pattern: Error linked to input
<label htmlFor="email">Email</label>
<input
  id="email"
  type="email"
  aria-describedby={error ? "email-error" : undefined}
  aria-invalid={error ? "true" : undefined}
/>
{error && (
  <span id="email-error" role="alert">
    {error}
  </span>
)}

---

Red Flags to Call Out

| Flag | Question | |------|--

Read more
@danielpodolsky
Ships withownyourcode

Claude Code workflow for AI-mentored development. Work efficiently with Spec-Driven Development and the 6 Gates. Built to fight cognitive offloading — for developers using AI to grow and maintain ownership.

Stars on GitHub

Momentum

stars in total
293
Star history of DanielPodolsky/ownyourcode on GitHub, a chart by star-history.com

Other skills on ownyourcode.

star-stories

star-stories

Transforms completed work into STAR interview stories (Situation, Task, Action, Result). Use when completing tasks, preparing for…

backend

backend

Reviews API design, REST conventions, and backend architecture. Use when junior builds API endpoints, Express routes, middleware,…

database

database

Reviews schema design, SQL queries, ORM patterns. Use when junior creates schema, writes queries, adds migrations, works with…

debugging

debugging

Guides systematic debugging through Protocol D (READ, ISOLATE, DOCS, HYPOTHESIZE, VERIFY). Use when junior says "stuck", "not…

documentation

documentation

Guides documentation standards including READMEs, JSDoc, and code comments. Use when writing documentation, adding comments, or…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about accessibility.

Which coding agents can use accessibility?
accessibility installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.