web-accessibility
Skill14 starsChanged 9 months agoApache-2.0View on GitHub
Implement web accessibility (a11y) standards following WCAG 2.1 guidelines. Use when building accessible UIs, fixing accessibility issues, or ensuring compliance with disability standards. Handles ARIA attributes, keyboard navigation, screen readers, semantic HTML, and accessibility testing.
22 other projects use a version of this.
Adopted by
Most recently taken up by
- Lukk17/agent-standardstheir own version, first seen Nov 24, 2026
- swadhinbiswas/SKILLStheir own version, first seen Nov 22, 2026
- meza/skillstheir own version, first seen Nov 15, 2026
- aktsmm/Agent-Skillstheir own version, first seen Nov 10, 2026
- Shui-Ching/skillstheir own version, first seen Nov 8, 2026
- reddygopalkrishna/developer-agent-skillstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use web-performance.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MRCalderon3DSkillweb-performance
Keep a browser game inside its frame budget through allocation discipline, pooling, and devtools-driven profiling.
Also in 3 projects that use this
Other versions22 projects use a version of this.
Word for word · 1
- Tgoldi/claude-skills★ 0100% same
Edited · 0
None found.
Wrote their own version · 21
- hoodini/ai-agents-skills★ 303same name
- magnus919/agent-skills★ 197same name
- ziniman/ai-instruct★ 29same name
- aktsmm/Agent-Skills★ 27same name
- s-hiraoku/synapse-a2a★ 17same name
- reddygopalkrishna/developer-agent-skills★ 8same name
- chadixearth/graphyloop★ 3same name
- 1leyo/web-accessibility-skill★ 2same name
- Adhamxon/claude-code-skills★ 2same name
- Makiya1202/ai-agents-skills★ 2same name
11 more not listed
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 repository1,129 other files it gives its agents.
- userinterface-wiki/AGENTS.mdAGENTS.md
- aaronontheweb-dotnet-skillsSkill
- ab-test-setupSkill
- acquiring-disk-image-with-dd-and-dcflddSkill
- Agent BrowserSkill
- agent-browserSkill
- agent-browserSkill
- agent-configurationSkill
- agent-email-cliSkill
- agent-evaluationSkill
- agentic-development-principlesSkill
- agentic-workflowSkill
- agent-toolsSkill
- ai-image-generationSkill
- ai-video-generationSkill
- algorithmic-artSkill
- analytics-trackingSkill
- analyzing-active-directory-acl-abuseSkill
- analyzing-android-malware-with-apktoolSkill
- analyzing-api-gateway-access-logsSkill
- analyzing-apt-group-with-mitre-navigatorSkill
- analyzing-azure-activity-logs-for-threatsSkill
- analyzing-bootkit-and-rootkit-samplesSkill
- analyzing-browser-forensics-with-hindsightSkill
- analyzing-campaign-attribution-evidenceSkill
- analyzing-certificate-transparency-for-phishingSkill
- analyzing-cloud-storage-access-patternsSkill
- analyzing-cobalt-strike-beacon-configurationSkill
- analyzing-cobaltstrike-malleable-c2-profilesSkill
- analyzing-cobalt-strike-malleable-profilesSkill
- analyzing-command-and-control-communicationSkill
- analyzing-cyber-kill-chainSkill
- analyzing-disk-image-with-autopsySkill
- analyzing-dns-logs-for-exfiltrationSkill
- analyzing-docker-container-forensicsSkill
- analyzing-email-headers-for-phishing-investigationSkill
- analyzing-ethereum-smart-contract-vulnerabilitiesSkill
- analyzing-golang-malware-with-ghidraSkill
- analyzing-heap-spray-exploitationSkill
- analyzing-indicators-of-compromiseSkill
- analyzing-ios-app-security-with-objectionSkill
- analyzing-kubernetes-audit-logsSkill
- analyzing-linux-audit-logs-for-intrusionSkill
- analyzing-linux-elf-malwareSkill
- analyzing-linux-kernel-rootkitsSkill
- analyzing-linux-system-artifactsSkill
- analyzing-lnk-file-and-jump-list-artifactsSkill
- analyzing-macro-malware-in-office-documentsSkill
- analyzing-malicious-pdf-with-peepdfSkill
- analyzing-malicious-url-with-urlscanSkill
- analyzing-malware-behavior-with-cuckoo-sandboxSkill
- analyzing-malware-family-relationships-with-malpediaSkill
- analyzing-malware-persistence-with-autorunsSkill
- analyzing-malware-sandbox-evasion-techniquesSkill
- analyzing-memory-dumps-with-volatilitySkill
- analyzing-memory-forensics-with-lime-and-volatilitySkill
- analyzing-mft-for-deleted-file-recoverySkill
- analyzing-network-covert-channels-in-malwareSkill
- analyzing-network-flow-data-with-netflowSkill
- analyzing-network-packets-with-scapySkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. 0 are common, 13 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 15 edited versions we read keep these.
13
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 50
Use meaningful HTML elements to make the structure clear.
- Very specific: line 53
Use semantic tags: <button>, <nav>, <main>, <header>, <footer>, etc.
- Very specific: line 54
Avoid overusing <div> and <span>
- Very specific: line 55
Use heading hierarchy (<h1> ~ <h6>) correctly
- Distinctive: line 99
Ensure all features are usable without a mouse.
- Very specific: line 111
Do not change focus order → avoid using tabindex="1+"
- Distinctive: line 293
Ensure sufficient contrast ratios for users with visual impairments.
- Distinctive: line 298
Do not convey information by color alone (use icons, patterns alongside)
- Distinctive: line 339
Check Lighthouse Accessibility score
- Distinctive: line 340
Test all features with keyboard only
- Distinctive: line 426
Keyboard Accessibility: All features must be usable without a mouse
- Very specific: line 430
Alternative Text: All images must have an alt attribute
- Distinctive: line 434
Clear Labels: All form inputs must have an associated label
- Distinctive: line 436
Do not use placeholder alone as a substitute for a label
- Very specific: line 440
Do Not Remove Outline: Never use outline: none
- Distinctive: line 442
Must provide a custom focus style instead
- Distinctive: line 444
Do Not Use tabindex > 0: Avoid changing focus order
- Distinctive: line 445
Keep DOM order logical
- Distinctive: line 449
Consider users with color blindness
“Common” is measured: kept by at least 6 in 10 of the 15 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Web Accessibility (A11y)
When to use this skill
- New UI Component Development: Designing accessible components
- Accessibility Audit: Identifying and fixing accessibility issues in existing sites
- Form Implementation: Writing screen reader-friendly forms
- Modals/Dropdowns: Focus management and keyboard trap prevention
- WCAG Compliance: Meeting legal requirements or standards
Input Format
Required Information
- Framework: React, Vue, Svelte, Vanilla JS, etc.
- Component Type: Button, Form, Modal, Dropdown, Navigation, etc.
- WCAG Level: A, AA, AAA (default: AA)
Optional Information
- Screen Reader: NVDA, JAWS, VoiceOver (for testing)
- Automated Testing Tool: axe-core, Pa11y, Lighthouse (default: axe-core)
- Browser: Chrome, Firefox, Safari (default: Chrome)
Input Example
Make a React modal component accessible:
- Framework: React + TypeScript
- WCAG Level: AA
- Requirements:
- Focus trap (focus stays inside the modal)
- Close with ESC key
- Close by clicking the background
- Title/description read by screen readersInstructions
Step 1: Use Semantic HTML
Use meaningful HTML elements to make the structure clear.
Tasks:
- Use semantic tags:
<button>,<nav>,<main>,<header>,<footer>, etc. - Avoid overusing
<div>and<span> - Use heading hierarchy (
<h1>~<h6>) correctly - Connect
<label>with<input>
Example (❌ Bad vs ✅ Good):
<!-- ❌ Bad example: using only div and span -->
<div class="header">
<span class="title">My App</span>
<div class="nav">
<div class="nav-item" onclick="navigate()">Home</div>
<div class="nav-item" onclick="navigate()">About</div>
</div>
</div>
<!-- ✅ Good example: semantic HTML -->
<header>
<h1>My App</h1>
<nav aria-label="Main navigation">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/about">About</a></li>
</ul>
</nav>
</header>Form Example:
<!-- ❌ Bad example: no label -->
<input type="text" placeholder="Enter your name">
<!-- ✅ Good example: label connected -->
<label for="name">Name:</label>
<input type="text" id="name" name="name" required>
<!-- Or wrap with label -->
<label>
Email:
<input type="email" name="email" required>
</label>Step 2: Implement Keyboard Navigation
Ensure all features are usable without a mouse.
Tasks:
- Move focus with Tab and Shift+Tab
- Activate buttons with Enter/Space
- Navigate lists/menus with arrow keys
- Close modals/dropdowns with ESC
- Use
tabindexappropriately
Decision Criteria:
- Interactive elements →
tabindex="0"(focusable) - Exclude from focus order →
tabindex="-1"(programmatic focus only) - Do not change focus order → avoid using
tabindex="1+"
Example (React Dropdown):
import React, { useState, useRef, useEffect } from 'react';
interface DropdownProps {
label: string;
options: { value: string; label: string }[];
onChange: (value: string) => void;
}
function AccessibleDropdown({ label, options, onChange }: DropdownProps) {
const [isOpen, setIsOpen] = useState(false);
const [selectedIndex, setSelectedIndex] = useState(0);
const buttonRef = useRef<HTMLButtonElement>(null);
const listRef = useRef<HTMLUListElement>(null);
// Keyboard handler
const handleKeyDown = (e: React.KeyboardEvent) => {
switch (e.key) {
case 'ArrowDown':
e.preventDefault();
if (!isOpen) {
setIsOpen(true);
} else {
setSelectedIndex((prev) => (prev + 1) % options.length);
}
break;
case 'ArrowUp':
e.preventDefault();
if (!isOpen) {
setIsOpen(true);
} else {
setSelectedIndex((prev) => (prev - 1 + options.length) % options.length);
}
break;
case 'Enter':
case ' ':
e.preventDefault();
if (isOpen) {
onChange(options[selectedIndex].value);
setIsOpen(false);
buttonRef.current?.focus();
} else {
setIsOpen(true);
}
break;
case 'Escape':
e.preventDefault();
setIsOpen(false);
buttonRef.current?.focus();
break;
}
};
return (
<div className="dropdown">
<button
ref={buttonRef}
onClick={() => setIsOpen(!isOpen)}
onKeyDown={handleKeyDown}
aria-haspopup="listbox"
aria-expanded={isOpen}
aria-labelledby="dropdown-label"
>
{label}
</button>
{isOpen && (
<ul
ref={listRef}
role="listbox"
aria-labelledby="dropdown-label"
onKeyDown={handleKeyDown}
tabIndex={-1}
>
{options.map((option, index) => (
<li
key={option.value}
role="option"
aria-selected={index === selectedIndex}
onClick={() => {
onChange(option.value);
setIsOpen(false);
}}
>
{option.label}
</li>
))}
</ul>
)}
</div>
);
}Step 3: Add ARIA Attributes
Provide additional context for screen readers.
Tasks:
aria-label: Define the element's namearia-labelledby: Reference another element as a labelaria-describedby: Provide additional descriptionaria-live: Announce dynamic content changesaria-hidden: Hide from screen readers
Checklist:
- All interactive elements have clear labels
- Button purpose is clear (e.g., "Submit form" not "Click")
- State change announcements (aria-live)
- Decorative images use alt="" or aria-hidden="true"
Example (Modal):
function AccessibleModal({ isOpen, onClose, title, children }) {
const modalRef = useRef<HTMLDivElement>(null);
// Focus trap when modal opens
useEffect(() => {
if (isOpen) {
modalRef.current?.focus();
}
}, [isOpen]);
if (!isOpen) return null;
return (
<div
role="dialog"
aria-modal="true"
aria-labelledby="modal-title"
aria-describedby="modal-description"
ref={modalRef}
tabIndex={-1}
onKeyDown={(e) => {
if (e.key === 'Escape') {
onClose();
}
}}
>
<div className="modal-overlay" onClick={onClose} aria-hidden="true" />
<div className="modal-content">
<h2 id="modal-title">{title}</h2>
<div id="modal-description">
{children}
</div>
<button onClick={onClose} aria-label="Close modal">
<span aria-hidden="true">×</span>
</button>
</div>
</div>
);
}aria-live Example (Notifications):
function Notification({ message, type }: { message: string; type: 'success' | 'error' }) {
return (
<div
role="alert"
aria-live="assertive" // Immediate announcement (error), "polite" announces in turn
aria-atomic="true" // Read the entire content
className={`notification notification-${type}`}
>
{type === 'error' && <span aria-label="Error">⚠️</span>}
{type === 'success' && <span aria-label="Success">✅</span>}
{message}
</div>
);
}Step 4: Color Contrast and Visual Accessibility
Ensure sufficient contrast ratios for users with visual impairments.
Tasks:
- WCAG AA: text 4.5:1, large text 3:1
- WCAG AAA: text 7:1, large text 4.5:1
- Do not convey information by color alone (use icons, patterns alongside)
- Clearly indicate focus (outline)
Example (CSS):
/* ✅ Sufficient contrast (text #000 on #FFF = 21:1) */
.button {
background-color: #0066cc;
color: #ffffff; /* contrast ratio 7.7:1 */
}
/* ✅ Focus indicator */
button:focus,
a:focus {
outline: 3px solid #0066cc;
outline-offset: 2px;
}
/* ❌ outline: none is forbidden! */
button:focus {
outline: none; /* Never use this */
}
/* ✅ Indicate state with color + icon */
.error-message {
color: #d32f2f;
border-left: 4px solid #d32f2f;
}
.error-message::before {
content: '⚠️';
margin-right: 8px;
}Step 5: Accessibility Testing
Validate accessibility with automated and manual testing.
Tasks:
- Automated scan with axe DevTools
- Check Lighthouse Accessibility score
- Test all features with keyboard only
- Screen reader testing (NVDA, VoiceOver)
Example (Jest + axe-core):
import { render } from '@testing-library/react';
import { axe, toHaveNoViolations } from 'jest-axe';
import AccessibleButton from './AccessibleButton';
expect.extend(toHaveNoViolations);
describe('AccessibleButton', () => {
it('should have no accessibility violations', async () => {
const { container } = render(
<AccessibleButton onClick={() => {}}>
Click Me
</AccessibleButton>
);
const results = await axe(container);
expect(results).toHaveNoViolations();
});
it('should be keyboard accessible', () => {
const handleClick = jest.fn();
const { getByRole } = render(
<AccessibleButton onClick={handleClick}>
Click Me
</AccessibleButton>
);
const button = getByRole('button');
// Enter key
button.focus();
fireEvent.keyDown(button, { key: 'Enter' });
expect(handleClick).toHaveBeenCalled();
// Space key
fireEvent.keyDown(button, { key: ' ' });
expect(handleClick).toHaveBeenCalledTimes(2);
});
});Output format
Basic Checklist
## Accessibility Checklist
### Semantic HTML
- [x] Use semantic HTML tags (`<button>`, `<nav>`, `<main>`, etc.)
- [x] Heading hierarchy is correct (h1 → h2 → h3)
- [x] All form labels are connected
### Keyboard Navigation
- [x] All interactive elements accessible via Tab
- [x] Buttons activated with Enter/Space
- [x] Modals/dropdowns closed with ESC
- [x] Focus indicator is clear (outline)
### ARIA
- [x] `role` used appropriately
- [x] `aria-label` or `aria-labelledby` provided
- [x] `aria-live` used for dynamic content
- [x] Decorative elements use `aria-hidden="true"`
### Visual
- [x] Color contrast meets WCAG AA (4.5:1)
- [x] Information not conveyed by color alone
- [x] Text size can be adjusted
- [x] Responsive design
### Testing
- [x] 0 axe DevTools violations
- [x] Lighthouse Accessibility score 90+
- [x] Keyboard test passed
- [x] Screen reader test completedConstraints
Mandatory Rules (MUST)
- Keyboard Accessibility: All features must be usable without a mouse
- Support Tab, Enter, Space, arrow keys, and ESC
- Implement focus trap (for modals)
- Alternative Text: All images must have an
altattribute- Meaningful images: descriptive alt text
- Decorative images:
alt=""(screen reader ignores)
- Clear Labels: All form inputs must have an associated label
<label for="...">oraria-label- Do not use placeholder alone as a substitute for a label
Prohibited Actions (MUST NOT)
- Do Not Remove Outline: Never use
outline: none- Disastrous for keyboard users
- Must provide a custom focus style instead
- Do Not Use tabindex > 0: Avoid changing focus order
- Keep DOM order logical
- Exception: only when there is a special reason
- Do Not Convey Information by Color Alone: Accompany with icons or text
- Consider users with color blindness
- e.g., "Click red item" → "Click ⚠️ Error item"
Examples
Example 1: Accessible Form
function AccessibleContactForm() {
const [errors, setErrors] = useState<Record<string, string>>({});
const [submitStatus, setSubmitStatus] = useState<'idle' | 'success' | 'error'>('idle');
return (
<form onSubmit={handleSubmit} noValidate>
<h2 id="form-title">Contact Us</h2>
<p id="form-description">Please fill out the form below to get in touch.</p>
{/* Name */}
<div className="form-group">
<label htmlFor="name">
Name <span aria-label="required">*</span>
</label>
<input
type="text"
id="name"
name="name"
required
aria-required="true"
aria-invalid={!!errors.name}
aria-describedby={errors.name ? 'name-error' : undefined}
/>
{errors.name && (
<span id="name-error" role="alert" className="error">
{errors.name}
</span>
)}
</div>
{/* Email */}
<div className="form-group">
<label htmlFor="email">
Email <span aria-label="required">*</span>
</label>
<input
type="email"
id="email"
name="email"
required
aria-required="true"
aria-invalid={!!errors.email}
aria-describedby={errors.email ? 'email-error' : 'email-hint'}
/>
<span id="email-hint" className="hint">
We'll never share your email.
</span>
{errors.email && (
<span id="email-error" role="alert" className="error">
{errors.email}
</span>
)}
</div>
{/* Submit button */}
<button type="submit" disabled={submitStatus === 'loading'}>
{submitStatus === 'loading' ? 'Submitting...' : 'Submit'}
</button>
{/* Success/failure messages */}
{submitStatus === 'success' && (
<div role="alert" aria-live="polite" className="success">
✅ Form submitted successfully!
</div>
)}
{submitStatus === 'error' && (
<div role="alert" aria-live="assertive" className="error">
⚠️ An error occurred. Please try again.
</div>
)}
</form>
);
}Example 2: Accessible Tab UI
function AccessibleTabs({ tabs }: { tabs: { id: string; label: string; content: React.ReactNode }[] }) {
const [activeTab, setActiveTab] = useState(0);
const handleKeyDown = (e: React.KeyboardEvent, index: number) => {
switch (e.key) {
case 'ArrowRight':
e.preventDefault();
setActiveTab((index + 1) % tabs.length);
break;
case 'ArrowLeft':
e.preventDefault();
setActiveTab((index - 1 + tabs.length) % tabs.length);
break;
case 'Home':
e.preventDefault();
setActiveTab(0);
break;
case 'End':
e.preventDefault();
setActiveTab(tabs.length - 1);
break;
}
};
return (
<div>
{/* Tab List */}
<div role="tablist" aria-label="Content sections">
{tabs.map((tab, index) => (
<button
key={tab.id}
role="tab"
id={`tab-${tab.id}`}
aria-selected={activeTab === index}
aria-controls={`panel-${tab.id}`}
tabIndex={activeTab === index ? 0 : -1}
onClick={() => setActiveTab(index)}
onKeyDown={(e) => handleKeyDown(e, index)}
>
{tab.label}
</button>
))}
</div>
{/* Tab Panels */}
{tabs.map((tab, index) => (
<div
key={tab.id}
role="tabpanel"
id={`panel-${tab.id}`}
aria-labelledby={`tab-${tab.id}`}
hidden={activeTab !== index}
tabIndex={0}
>
{tab.content}
</div>
))}
</div>
);
}Best practices
- Semantic HTML First: ARIA is a last resort
- Using the correct HTML element makes ARIA unnecessary
- e.g.,
<button>vs<div role="button">
- Focus Management: Manage focus on page transitions in SPAs
- Move focus to main content on new page load
- Provide skip links ("Skip to main content")
- Error Messages: Clear and helpful error messages
- "Invalid input" ❌ → "Email must be in format: example@domain.com" ✅
References
Metadata
Version
- Current Version: 1.0.0
- Last Updated: 2025-01-01
- Compatible Platforms: Claude, ChatGPT, Gemini
Related Skills
- ui-component-patterns: UI component implementation
- responsive-design: Responsive design
Tags
#accessibility #a11y #WCAG #ARIA #screen-reader #keyboard-navigation #frontend
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.

