--- name: accessibility-ui-design description: When designing and implementing web interfaces to ensure they are usable by everyone. version: 2.0.0 category: ui-ux tags: [ui-ux, a11y, inclusive-design, wcag] skill_type: architecture author: skiLLM license: MIT compatible_agents: [claude-code, cursor, copilot, codex] estimated_context_tokens: 1900 dangerous: false requires_review: true security_level: safe dependencies: [dom-security-hardening] triggers: [a11y, accessibility, wcag, screen reader, keyboard navigation] permissions: filesystem: { read: true, write: true } network: { outbound: false } shell: { execute: false } input_requirements: [HTML markup, interactive components] output_contract: [semantic html, keyboard navigable, screen reader compatible, wcag aa compliant] failure_conditions: [missing alt attributes, focus trap broken, color-only distinction, non-semantic components] last_updated: 2026-05-15 --- # Accessibility (a11y) UI Design ## Purpose Accessible interfaces are NOT optional extras—they're legal requirements (ADA, WCAG). This skill ensures web interfaces work for everyone: keyboard users, screen reader users, color-blind users, and users with cognitive disabilities. Accessible design is better design for all users. ## When to use - Writing HTML markup for UI components - Designing complex interactive widgets (modals, dropdowns, tabs, date pickers) - Auditing existing user interfaces for WCAG compliance - Building custom form controls - Creating data tables or other structured content ## When NOT to use - Visual design (separate concern) - Component styling (use CSS appropriately) - Performance optimization (different concern) ## Inputs required - HTML or JSX markup - List of interactive behaviors - Understanding of WCAG 2.1 AA standards - Accessibility testing tools (axe, Lighthouse, NVDA) ## Workflow 1. **Use Semantic HTML First**: Use native elements (` // GOOD: Label explicitly associated // GOOD: Error shown with icon and text (not just color)
Password too short (minimum 8 characters)
// GOOD: Modal with focus trap and keyboard handling const Modal = ({ isOpen, onClose, children }) => { const modalRef = useRef(null); useEffect(() => { if (!isOpen) return; const handleKeyDown = (e) => { if (e.key === 'Escape') onClose(); }; // Focus first interactive element in modal const firstFocusable = modalRef.current?.querySelector('button, [href], input'); firstFocusable?.focus(); window.addEventListener('keydown', handleKeyDown); return () => window.removeEventListener('keydown', handleKeyDown); }, [isOpen]); return (

Modal Title

{children}
); }; ```