- Home
- Skills
- UX & UI Design
- Accessible UI Components — WCAG 2.2 AA
Works with the AI Agents you already use
Accessible UI Components — WCAG 2.2 AA
Build and audit WCAG 2.2 AA compliant UI components with semantic HTML and robust ARIA patterns.
Free
Accessible UI Components — WCAG 2.2 AA
Example session with this skill installed
Convert this React button that opens a settings panel into an accessible component. It currently uses a div with an onClick handler.
- Read your context and instructions
- Compiled the accessible ui components
I have refactored the settings trigger from a generic div to a semantic <button>. This provides native keyboard support (Enter/Space) and correctly announces the state to screen readers using aria-expanded.
Accessible Settings Trigger
import React, { useState, useRef } from 'react';
function SettingsMenu() {
const [isOpen, setIsOpen] = useState(false);
const triggerRef = useRef<HTMLButtonElement>(null);
const toggleMenu = () => setIsOpen(!isOpen);
return (
<div className="settings-container">
<button
ref={triggerRef}
type="button"
aria-haspopup="true"
aria-expanded={isOpen}
aria-controls="settings-panel"
onClick={toggleMenu}
className="settings-trigger"
>
<span aria-hidden="true">⚙️</span>
Settings
</button>
{isOpen && (
<div
id="settings-panel"
role="region"
aria-labelledby={triggerRef.current?.id}
>
{/* Menu content goes here */}
<p>Privacy and Account settings</p>
</div>
)}
<style jsx>{`
.settings-trigger {
min-width: 44px;
min-height: 44px;
padding: 8px 16px;
cursor: pointer;
}
.settings-trigger:focus-visible {
outline: 2px solid #005fcc;
outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
.settings-trigger {
transition: none;
}
}
`}</style>
</div>
);
}
Next steps
- Add a
keydownlistener to close the panel when theEscapekey is pressed. - Ensure the settings panel has a
tabindex="-1"if you need to programmatically move focus into it when it opens. - Verify that the settings icon has
aria-hidden="true"since the text "Settings" already provides the accessible name.
Connects securely to your tools. The creator never sees your data.
About this skill
Building user interfaces that work for everyone is often treated as an afterthought, leading to inaccessible products and legal liability. This skill forces accessibility into the core of your development process by enforcing WCAG 2.2 AA standards from the start. It eliminates the guesswork of ARIA roles and focus management by prioritizing native HTML elements and only applying custom patterns when technically necessary.
What it does
- Component Auditing identifies accessibility gaps in existing UI code against WCAG 2.2 AA standards.
- Semantic Implementation generates UI components using native elements like
<dialog>and<details>to ensure built-in keyboard support. - Focus Management handles complex interactions like modal traps, skip links, and focus restoration on element closure.
- State Management applies correct ARIA attributes for dynamic UI states including
aria-expanded,aria-pressed, andaria-invalid. - Form Hardening links errors, hints, and labels using
aria-describedbyand ensuresautocompletetokens are correctly placed.
How it works
- Analyze Requirements: The skill identifies the required UI pattern and checks if a native element exists to solve it.
- Implement Semantics: Code is generated or refactored using the "Native first, ARIA second" rule.
- Apply Interaction Logic: Full keyboard maps, focus-visible styles, and motion preferences are injected.
- Verify and Report: The skill runs through a specialized checklist for keyboard traps, zoom scaling, and screen reader announcements.
Frameworks & tools
Works with any frontend stack including React, Vue, Svelte, and vanilla HTML/CSS. It follows WCAG 2.2 AA guidelines and utilizes ARIA 1.2 patterns.
Why this beats prompting it yourself
Generic AI often over-uses ARIA attributes which confuses screen readers. This skill follows the strict "Rule Zero" of accessibility: using native elements first to ensure the highest level of compatibility across assistive technologies without bloated code.
Use cases
- Refactoring a
div-based custom dropdown into a compliant combobox pattern. - Building a modal dialog that correctly traps focus and closes on the Escape key.
- Creating complex forms with real-time validation and accessible error announcements.
- Ensuring a site remains usable at 200% zoom and respects
prefers-reduced-motion.
Known limitations
Does not perform automated color contrast calculations on image-based backgrounds. Requires the developer to verify specific screen reader pronunciations for highly specialized jargon.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for UX & UI Design.
Cannot calculate contrast for text over images. Developer must manually verify screen reader pronunciation for niche industry jargon.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
2 uses
Times used to date
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 5 days ago
- Free with an Agensi account
Nothing to install. It runs in your AI agent.
- Optional
Node.js@axe-core/cli (automated audit)