a11y-annotation-generator
Adds accessibility annotations (ARIA labels, roles, alt text) to make web content accessible. Use when user asks to "add accessibility", "make accessible", "add aria labels", "wcag compliance", or "screen reader support".
What this skill does
# Accessibility Annotation Generator
Automatically adds ARIA labels, roles, alt text, and other accessibility annotations to HTML/JSX/Vue templates.
## When to Use
- "Make this component accessible"
- "Add ARIA labels"
- "Add alt text to images"
- "Make accessible for screen readers"
- "Add accessibility annotations"
- "WCAG compliance"
## Instructions
### 1. Scan for Accessibility Issues
Analyze HTML/JSX/Vue files for common issues:
```bash
# Find images without alt text
grep -r "<img" src/ --include="*.jsx" --include="*.tsx" --include="*.vue" | grep -v "alt="
# Find buttons without labels
grep -r "<button" src/ | grep -v "aria-label"
# Find form inputs without labels
grep -r "<input" src/ | grep -v "aria-label" | grep -v "<label"
# Find interactive elements without role
grep -r "onClick" src/ | grep -v "role="
```
### 2. Add Missing Alt Text
**Images:**
```jsx
// Before
<img src="/logo.png" />
<img src="/photo.jpg" className="avatar" />
// After
<img src="/logo.png" alt="Company Logo" />
<img src="/photo.jpg" alt="Profile photo of John Doe" className="avatar" />
// Decorative images (no alt needed, but must be explicit)
<img src="/decorative-line.png" alt="" role="presentation" />
```
**Background images (CSS):**
```jsx
// Add ARIA label for meaningful background images
<div
className="hero-banner"
role="img"
aria-label="Team collaborating in modern office"
style={{ backgroundImage: 'url(/hero.jpg)' }}
>
```
### 3. Add ARIA Labels to Interactive Elements
**Buttons:**
```jsx
// Before
<button onClick={handleDelete}>
<TrashIcon />
</button>
// After
<button
onClick={handleDelete}
aria-label="Delete item"
>
<TrashIcon aria-hidden="true" />
</button>
// Or with visible text
<button onClick={handleDelete}>
<TrashIcon aria-hidden="true" />
<span>Delete</span>
</button>
```
**Icon-only buttons:**
```jsx
// Before
<button onClick={handleEdit}>
<EditIcon />
</button>
// After
<button
onClick={handleEdit}
aria-label="Edit profile"
title="Edit profile"
>
<EditIcon aria-hidden="true" />
</button>
```
**Links:**
```jsx
// Before
<a href="/settings">
<SettingsIcon />
</a>
// After
<a href="/settings" aria-label="Go to settings">
<SettingsIcon aria-hidden="true" />
</a>
// Avoid generic "click here"
// Before
<a href="/docs">Click here</a>
// After
<a href="/docs">Read the documentation</a>
```
### 4. Add Form Accessibility
**Labels for inputs:**
```jsx
// Before
<input type="email" placeholder="Email" />
// After - Method 1: Visible label (preferred)
<label htmlFor="email">Email address</label>
<input
type="email"
id="email"
name="email"
aria-required="true"
/>
// After - Method 2: aria-label (if no visible label)
<input
type="email"
aria-label="Email address"
aria-required="true"
placeholder="Email"
/>
```
**Error messages:**
```jsx
// Before
{error && <span className="error">{error}</span>}
// After
<input
type="email"
id="email"
aria-invalid={!!error}
aria-describedby={error ? "email-error" : undefined}
/>
{error && (
<span id="email-error" role="alert" className="error">
{error}
</span>
)}
```
**Required fields:**
```jsx
<label htmlFor="name">
Name <span aria-label="required">*</span>
</label>
<input
type="text"
id="name"
required
aria-required="true"
/>
```
**Field descriptions:**
```jsx
<label htmlFor="password">Password</label>
<input
type="password"
id="password"
aria-describedby="password-requirements"
/>
<div id="password-requirements">
Must be at least 8 characters with 1 uppercase letter and 1 number
</div>
```
### 5. Add Semantic HTML and Roles
**Navigation:**
```jsx
// Before
<div className="nav">
<a href="/">Home</a>
<a href="/about">About</a>
</div>
// After
<nav aria-label="Main navigation">
<a href="/">Home</a>
<a href="/about">About</a>
</nav>
```
**Landmarks:**
```jsx
<header role="banner">
<nav aria-label="Main navigation">...</nav>
</header>
<main role="main">
<section aria-labelledby="products-heading">
<h2 id="products-heading">Our Products</h2>
...
</section>
</main>
<aside role="complementary" aria-label="Related articles">
...
</aside>
<footer role="contentinfo">
...
</footer>
```
**Lists:**
```jsx
// Before
<div className="menu">
<div>Home</div>
<div>About</div>
</div>
// After
<ul role="list">
<li><a href="/">Home</a></li>
<li><a href="/about">About</a></li>
</ul>
```
### 6. Add Keyboard Navigation Support
**Focusable elements:**
```jsx
// Before
<div onClick={handleClick}>Click me</div>
// After
<div
role="button"
tabIndex={0}
onClick={handleClick}
onKeyDown={(e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault()
handleClick()
}
}}
aria-label="Submit form"
>
Click me
</div>
// Better: Use actual button
<button onClick={handleClick} aria-label="Submit form">
Click me
</button>
```
**Skip links:**
```jsx
<a href="#main-content" className="skip-link">
Skip to main content
</a>
<main id="main-content">
...
</main>
// CSS
.skip-link {
position: absolute;
top: -40px;
left: 0;
background: #000;
color: white;
padding: 8px;
z-index: 100;
}
.skip-link:focus {
top: 0;
}
```
**Tab order:**
```jsx
// Control tab order with tabIndex
<button tabIndex={1}>First</button>
<button tabIndex={2}>Second</button>
// Or keep natural order (preferred)
<button>First</button>
<button>Second</button>
```
### 7. Add Live Regions for Dynamic Content
**Announcements:**
```jsx
// Status messages
<div role="status" aria-live="polite">
{statusMessage}
</div>
// Urgent alerts
<div role="alert" aria-live="assertive">
{errorMessage}
</div>
// Loading state
<div
role="status"
aria-live="polite"
aria-busy={isLoading}
>
{isLoading ? 'Loading...' : 'Content loaded'}
</div>
```
**Progress indicators:**
```jsx
<div
role="progressbar"
aria-valuenow={progress}
aria-valuemin={0}
aria-valuemax={100}
aria-label="Upload progress"
>
{progress}%
</div>
```
### 8. Add Modal/Dialog Accessibility
**Modal:**
```jsx
<div
role="dialog"
aria-modal="true"
aria-labelledby="modal-title"
aria-describedby="modal-description"
>
<h2 id="modal-title">Confirm Delete</h2>
<p id="modal-description">
Are you sure you want to delete this item?
</p>
<button onClick={handleConfirm}>Confirm</button>
<button onClick={handleCancel}>Cancel</button>
</div>
// Focus management
useEffect(() => {
if (isOpen) {
// Save current focus
const previousFocus = document.activeElement
// Focus first element in modal
modalRef.current?.focus()
// Trap focus in modal
const handleKeyDown = (e) => {
if (e.key === 'Escape') {
handleClose()
}
}
document.addEventListener('keydown', handleKeyDown)
return () => {
document.removeEventListener('keydown', handleKeyDown)
// Restore focus
previousFocus?.focus()
}
}
}, [isOpen])
```
### 9. Add Dropdown/Menu Accessibility
**Dropdown menu:**
```jsx
<div>
<button
aria-expanded={isOpen}
aria-haspopup="true"
aria-controls="dropdown-menu"
onClick={toggleMenu}
>
Menu
</button>
{isOpen && (
<ul
id="dropdown-menu"
role="menu"
>
<li role="menuitem">
<a href="/profile">Profile</a>
</li>
<li role="menuitem">
<a href="/settings">Settings</a>
</li>
<li role="menuitem">
<button onClick={handleLogout}>Logout</button>
</li>
</ul>
)}
</div>
```
**Accordion:**
```jsx
<div>
<h3>
<button
aria-expanded={isExpanded}
aria-controls="panel-1"
id="accordion-header-1"
onClick={toggle}
>
Section 1
</button>
</h3>
{isExpanded && (
<div
id="panel-1"
role="region"
aria-labelledby="accordion-header-1"
>
Content here...
</div>
)}
</div>
```
### 10. Add Table Accessibility
**Data tables:**
```jsx
<table>
<caption>Employee Information</capRelated in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.