| name | wcag-aaa-web-design |
|---|---|
| description | Create corporate/formal, device-sensitive web applications compliant with WCAG 2.2 AAA standards. Use for building highly accessible websites and web apps that require strict adherence to accessibility, a formal tone, and responsive design for at least three device sizes. This skill provides a complete workflow, design system, component templates, and validation scripts. |
This skill provides a comprehensive, framework-agnostic workflow for creating enterprise-grade, corporate/formal web applications that meet the highest level of web accessibility, WCAG 2.2 Level AAA. It is grounded in industry best practices from Nielsen Norman Group, IBM Carbon Design System, and OWASP.
It provides production-grade resources: a formal design system, responsive HTML/CSS templates, ARIA patterns, a modular JavaScript template, security guidance, and robust validation scripts.
- Corporate/Formal Tone: All content must use professional language. No emoji, slang, or informalities.
- Enterprise-Grade UX: Prioritize efficiency, clarity, and scalability for complex, data-intensive workflows.
- Device-Sensitive: The layout must be responsive and tested on at least three breakpoints (mobile, tablet, desktop).
- AAA Compliance: All 87 WCAG 2.2 success criteria (A, AA, and AAA) must be met.
- Secure by Default: All templates and patterns follow OWASP best practices for front-end security.
- Modular & Maintainable: No hardcoded values. All styling uses CSS custom properties. All JavaScript is modular with single-responsibility functions.
Set up the project and apply the corporate visual style.
- Copy Templates: Copy all files from the
templates/directory into your project. - Consult Design System: Read
references/corporate-design-system.mdfor the AAA-compliant color palette, typography, spacing, CSS architecture (BEM naming), and performance guidance. - Apply Tokens: Use CSS custom properties from
tokens.cssandcomponents.cssfor all styling. - Custom Branding: If brand colors are provided, validate the entire color system:
python3 scripts/check_contrast.py --tokens templates/tokens.css
Harden the application against common web vulnerabilities.
- Read Security Guide: Read
references/security-error-handling.mdfor essential patterns covering CSP, XSS prevention, CSRF protection, and secrets management. - Configure CSP: Set a strict, nonce-based Content Security Policy as an HTTP header. If no server is available, use the
<meta>tag fallback inbase.html. - Configure Headers: Set all recommended HTTP security headers on the server (
Strict-Transport-Security,X-Content-Type-Options,Referrer-Policy,Permissions-Policy).
Define the application structure and navigation.
- Consult Navigation Patterns: Read
references/navigation-patterns.md. - Implement Navigation: Use
sidebar-nav.htmlfor complex apps orheader.htmlfor simpler sites. - Include JavaScript: Use
main.jsas the entry point. It provides accessible navigation toggle, focus trapping, sidebar, and Escape key handling.
Build pages with semantic HTML and proper heading hierarchy.
- Use
base.html: Use as the foundation for all pages. It includes skip links, ARIA landmarks, live regions, and security meta tags. - Heading Hierarchy (2.4.10): Every page MUST have exactly one
<h1>. Sections must use logical heading order. - Line Length (1.4.8): Place long-form text inside
.text-container(max-width: 80ch). - External Links: All links opening in a new tab MUST use
rel="noopener noreferrer"and include screen reader text(opens in a new tab).
Design for data-heavy screens and non-ideal states.
- Data Tables: Use
data-table.html. Readreferences/data-presentation.mdfor sorting, filtering, and density patterns. - Application States: Read
references/application-states.mdfor loading (skeleton screens fromcomponents.css), empty states (empty-state.html), error states, API error handling, and JavaScript error boundaries.
Build accessible interactive elements with proper security.
- ARIA Patterns: Read
references/aria-patterns.mdfor Modals, Tabs, Accordions, and Menus. - Form Security: Read
references/form-patterns.md. All state-changing forms MUST use CSRF tokens. All user input MUST be encoded on output (textContent, neverinnerHTML). - Destructive Actions: All delete/irreversible actions MUST require confirmation. Use
data-confirmattribute withmain.js. - Error Handling: Use
main.jsglobal error handlers. Announce errors to screen readers via the live regions inbase.html.
Automated and manual checks confirm compliance.
- Run Automated Audit:
bash scripts/validate_accessibility.sh http://localhost:3000 bash scripts/validate_accessibility.sh --pages urls.txt --output report.json
- Manual Review: Automated tools catch ~40% of issues. Use
references/wcag-aaa-checklist.mdfor a full manual audit.
| Directory | File | Purpose |
|---|---|---|
scripts/ |
check_contrast.py |
AAA contrast checker with --tokens mode and suggestion engine. |
validate_accessibility.sh |
Automated WCAG 2.2 AAA audit with JSON reporting. | |
references/ |
security-error-handling.md |
CSP, XSS, CSRF, secrets management, and error handling patterns. |
corporate-ux-patterns.md |
Enterprise UX guide: visual hierarchy, information density. | |
application-states.md |
Loading, empty, error states, API errors, JS error boundaries. | |
data-presentation.md |
Data table and dashboard design patterns. | |
navigation-patterns.md |
Sidebar, tab, and breadcrumb navigation patterns. | |
wcag-aaa-checklist.md |
Complete 87-criteria WCAG 2.2 checklist. | |
corporate-design-system.md |
AAA color palette, typography, spacing, CSS architecture, BEM naming. | |
aria-patterns.md |
ARIA patterns for Modals, Tabs, Accordions, Menus. | |
form-patterns.md |
Accessible forms with CSRF, XSS prevention, and validation. | |
responsive-breakpoints.md |
3+ breakpoint system with layout and touch target guidance. | |
templates/ |
base.html |
HTML5 boilerplate with security meta tags, skip links, live regions. |
header.html |
Accessible header with responsive nav and XSS-safe search. | |
footer.html |
Accessible footer with external link security pattern. | |
main.js |
Modular JS: nav toggle, focus trap, sidebar, error handling, announcements. | |
data-table.html |
Sortable, responsive data table with bulk actions. | |
empty-state.html |
Templates for empty, no-results, and error scenarios. | |
sidebar-nav.html |
Collapsible, hierarchical sidebar navigation. | |
tokens.css |
Design tokens, base styles, skeleton tokens, external link indicator. | |
responsive.css |
Mobile-first responsive grid system. | |
components.css |
Enterprise components: tables, skeletons, sidebar, toasts, badges. |