Accessibility Testing
Our design system is built with accessibility as a core principle, ensuring WCAG 2.1 AA compliance across all components and color combinations in both light and dark modes.
Color Contrast Testing
Test any color combination against WCAG 2.1 guidelines to ensure proper contrast ratios for text and UI elements.
Testing pure neutral gray combinations for WCAG 2.1 AA compliance. All text should maintain a contrast ratio of at least 4.5:1 (AA) or 7:1 (AAA).
Compliance Summary
Overview of our design system's accessibility compliance across all color pairs and modes.
WCAG Compliance Testing
Comprehensive breakdown of all color combinations and their WCAG compliance status. Toggle your site theme to see compliance update for light and dark modes.
19 of 34 pairs compliant · 13 AAA · 6 AA
background/headingH1 15.75:1 background/headingH2 15.74:1 background/headingH3 15.74:1 background/headingH4 15.72:1 background/textBody 9.61:1 background/textSecondary 6.67:1 background/textTertiary 4.17:1 background/textDisabled 2.47:1 background/foreground 15.75:1 background/foregroundSecondary 9.61:1 background/foregroundTertiary 6.67:1 background/foregroundDisabled 2.47:1 background/primary 3.00:1 background/primaryHover 2.99:1 background/primaryMuted 2.99:1 background/secondary 2.74:1 background/secondaryHover 2.38:1 background/secondaryMuted 2.07:1 background/error 2.99:1 background/warning 3.60:1 background/success 10.71:1 background/info 1.80:1 surface/foreground 14.36:1 surface/foregroundSecondary 8.76:1 surface/foregroundTertiary 6.08:1 surface/foregroundDisabled 2.25:1 surface/primary 2.73:1 surface/secondary 2.50:1 surfaceSecondary/foreground 12.56:1 surfaceSecondary/foregroundSecondary 7.66:1 surfaceSecondary/foregroundTertiary 5.32:1 surfaceTertiary/foreground 10.97:1 surfaceTertiary/foregroundSecondary 6.69:1 surfaceTertiary/foregroundTertiary 4.65:1 Semantic HTML Examples
Proper semantic HTML is crucial for accessibility. Our components use appropriate ARIA labels and roles.
WCAG 2.1 Standards
Level AA Requirements & Design Decisions
Our design system prioritizes readability and aesthetic balance over strict WCAG compliance, with the following considerations:
What Passes WCAG AA
Light Mode:
- ✅ Text Secondary and above - All pass AA (4.5:1+)
- ✅ Headings (h1-h4) - Pure extremes provide AAA contrast
- ✅ Interactive elements - Buttons, active navigation use heading-level contrast
- ✅ Accent colors - Most semantic colors pass on background
Dark Mode:
- ✅ Headings (h1-h4) - Pure extremes provide AAA contrast
- ✅ Interactive elements - Buttons, active navigation use heading-level contrast
- ✅ Most accent colors - Better contrast on dark backgrounds than light mode
Intentional Aesthetic Choices
Dark Mode Body Text (Fails WCAG AA):
- Body text: 3.73:1 (needs 4.5:1) - Prioritizes subtle, comfortable reading aesthetic
- Secondary text: 2.34:1 - Supporting information, readable but de-emphasized
- Tertiary text: 1.62:1 - Metadata, captions
- Disabled text: 1.16:1 - Intentionally low contrast for inactive states
Why this works for us:
- This is a personal design system for a single developer’s projects, not critical public infrastructure
- Headings and interactive elements always pass AAA for clear hierarchy and navigation
- Body text remains comfortably readable on modern high-resolution displays
- Dark mode aesthetic prioritizes reduced eye strain over maximum contrast
- Light mode provides higher contrast for users who prefer it
Trade-offs acknowledged:
- Different color systems and themes have different strengths - light mode passes text contrast, dark mode passes more accent colors
- No single theme satisfies all WCAG requirements across all token combinations
- For critical documentation or public-facing applications, stricter compliance would be necessary
Core Accessibility Commitments
- Use of Color: Information is not conveyed by color alone
- Focus Visible: Keyboard focus indicators are clearly visible
- Keyboard Navigation: All interactive elements are keyboard accessible
- Semantic HTML: Proper heading hierarchy and ARIA labels throughout
Testing Methodology
- Automated Testing: Color contrast ratios are calculated using WCAG formulas
- Manual Testing: Keyboard navigation and screen reader compatibility
- Real-World Usage: Testing with actual assistive technologies
- Continuous Monitoring: Automated checks in our build process
Accessibility Guidelines
For Designers
- Use Semantic Colors: Stick to our design system tokens that ensure proper contrast
- Test Color Combinations: Use the Color Contrast Tester above
- Provide Alt Text: All images must have descriptive alternative text
- Design for Keyboard: Ensure all interactions work without a mouse
For Developers
- Use Semantic HTML: Proper heading hierarchy, landmarks, and form labels
- ARIA When Needed: Add ARIA labels only when semantic HTML isn’t sufficient
- Keyboard Support: All interactive elements must support Tab, Enter, and Escape
- Focus Management: Visible focus indicators and logical focus order
Tools & Resources
Testing Tools
- Color Contrast Tester - Built into this page
- WAVE - Web accessibility evaluation tool
- axe DevTools - Browser extension for accessibility testing
- Lighthouse - Automated accessibility audits
External Resources
- WCAG 2.1 Guidelines - Official specification
- WebAIM - Web accessibility resources
- A11y Project - Community-driven accessibility resources
Related Documentation
- Color System - Our OKLCH-based color palette
- Typography System - Text hierarchy and readability
- Button Component - Accessible button patterns
- Form Components - Accessible form controls