Skip to content
accessibility-fundamentals logo

Accessibility Fundamentals Review

accessibility-fundamentals

Auto-invoke when reviewing JSX with interactive elements, forms, buttons, or navigation. Enforces WCAG compliance and inclusive design.

aiskillstore/marketplace0installs430stars

SKILL.md

Full skill instructions

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="[email protected]" />

// ✅ 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

AttributeUse Case
aria-labelProvides name for icon-only buttons
aria-labelledbyPoints to element with visible label
aria-describedbyPoints to description (error messages)
aria-hidden="true"Hides decorative icons from screen readers
aria-expandedIndicates dropdown/​accordion state
aria-liveAnnounces dynamic content changes
roleDefines 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

FlagQuestion
<div onClick>"What happens when a keyboard user tries to click this?"
outline: none"How does a keyboard user know where they are?"
No form labels"How does a screen reader know what this input is for?"
Icon-only button"What does a screen reader announce for this button?"
Color as only indicator"What if someone is red-green colorblind?"
tabIndex > 0"This breaks natural tab order. Why is it needed?"

Interview Connection

"I implemented accessibility best practices including semantic HTML, proper form labeling, and keyboard navigation, ensuring our app is usable by everyone."

STAR story material:

  • "Identified accessibility issues with our form and fixed them..."
  • "Implemented proper focus management in our modal component..."
  • "Added screen reader support for our notification system..."

MCP Usage

Context7 - Framework Docs

Fetch: WAI-ARIA practices
Fetch: React accessibility documentation

Octocode - Real Examples

Search: "aria-label" + "button" patterns
Search: Modal focus trapping implementations

Resources

  • WCAG 2.1 Guidelines (check Context7)
  • Deque's axe-core for automated testing
  • WebAIM color contrast checker

More skills from aiskillstore

docx logo
aiskillstore/marketplace

docx

Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks

430 216
View
agent-development logo
aiskillstore/marketplace

agent-development

This handles everything around building autonomous agents for Claude Code plugins.

430 197
View
doc-coauthoring logo
aiskillstore/marketplace

doc-coauthoring

Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.

430 196
View
skill-development logo
aiskillstore/marketplace

skill-development

This is the meta-skill for building skills themselves.

430 196
View
canvas-design logo
aiskillstore/marketplace

canvas-design

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

430 193
View
webapp-testing logo
aiskillstore/marketplace

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

430 191
View
hook-development logo
aiskillstore/marketplace

hook-development

Helps you build event-driven automation for Claude Code using hooks that trigger on tool use, session events, and stop conditions.

430 187
View
algorithmic-art logo
aiskillstore/marketplace

algorithmic-art

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.

430 185
View
command-development logo
aiskillstore/marketplace

command-development

Shows Claude Code how to build slash commands from markdown files, covering the YAML frontmatter options, dynamic arguments with $1/$2...

430 185
View
plugin-structure logo
aiskillstore/marketplace

plugin-structure

This is your reference when scaffolding Claude Code plugins or figuring out why components aren't loading.

430 183
View
skill-installer logo
aiskillstore/marketplace

skill-installer

Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).

430 180
View
web-artifacts-builder logo
aiskillstore/marketplace

web-artifacts-builder

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

430 177
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View