Accessibility is a core principle of the Paste design system. Every component is built to meet WCAG 2.1 AA standards, ensuring that applications built with Paste are usable by everyone, including people with disabilities.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Twilio-labs/paste/llms.txt
Use this file to discover all available pages before exploring further.
Accessibility Standards
Paste follows the Web Content Accessibility Guidelines (WCAG) 2.1 Level AA standards:- Perceivable: Information and UI components are presentable to users in ways they can perceive
- Operable: UI components and navigation are operable by all users
- Understandable: Information and UI operation are understandable
- Robust: Content can be interpreted by a wide variety of user agents, including assistive technologies
WCAG 2.1 AA Compliance
All Paste components meet WCAG 2.1 Level AA requirements, including:- Color contrast ratios of at least 4.5:1 for normal text
- Color contrast ratios of at least 3:1 for large text and UI components
- Keyboard navigation support
- Screen reader compatibility
- Focus management
- Proper semantic HTML
Paste components are tested with screen readers including NVDA, JAWS, and VoiceOver to ensure compatibility.
Built-in Accessibility Features
Color Contrast
All Paste design tokens are validated for proper color contrast:colorTextoncolorBackground: ≥ 4.5:1colorTextWeakoncolorBackground: ≥ 4.5:1- UI controls: ≥ 3:1 contrast
Keyboard Navigation
All interactive Paste components are fully keyboard accessible:Keyboard Shortcuts
Common keyboard interactions supported:- Tab: Move focus forward
- Shift + Tab: Move focus backward
- Enter/Space: Activate buttons and links
- Escape: Close modals, menus, and popovers
- Arrow keys: Navigate lists, menus, and tabs
- Home/End: Jump to first/last item in lists
Screen Reader Support
Paste components include proper ARIA attributes and semantic HTML:ARIA Attributes
Paste components automatically include appropriate ARIA attributes:aria-label: Descriptive labels for screen readersaria-labelledby: Associates labels with elementsaria-describedby: Provides additional descriptionsaria-expanded: Indicates expandable statearia-haspopup: Indicates popup presencearia-controls: Identifies controlled elementsaria-live: Announces dynamic content changes
Focus Management
Paste handles focus correctly in interactive components:- Focus trapped within modals and dialogs
- Focus returned to trigger element on close
- Visible focus indicators
- Skip links for navigation
Semantic HTML
Paste uses proper semantic HTML elements:Accessible Patterns
Form Accessibility
Forms are fully accessible with labels, help text, and error messages:Icon Accessibility
Icons should be marked as decorative or include accessible labels:Link Accessibility
Links should have descriptive text:Alert and Status Messages
Use live regions for dynamic content:Testing for Accessibility
Manual Testing
- Keyboard Navigation: Navigate your entire UI using only the keyboard
- Screen Reader: Test with NVDA (Windows), JAWS (Windows), or VoiceOver (Mac)
- Color Contrast: Use browser DevTools to check contrast ratios
- Focus Indicators: Verify visible focus states on all interactive elements
- Zoom: Test at 200% browser zoom
Automated Testing
Use accessibility testing tools:Color Contrast Checking
Paste provides utilities to check theme contrast:Best Practices
Do’s
- Use semantic HTML: Choose the right HTML element for the job
- Provide text alternatives: Add alt text for images and labels for icons
- Ensure keyboard access: All interactive elements should be keyboard accessible
- Include focus indicators: Never remove focus outlines without replacement
- Write descriptive labels: Use clear, concise labels for form fields and buttons
- Test with assistive technology: Regularly test with screen readers
- Respect user preferences: Honor prefers-reduced-motion and prefers-color-scheme
Don’ts
- Don’t rely on color alone: Use text, icons, or patterns in addition to color
- Don’t remove focus outlines: Without providing an alternative
- Don’t use placeholder as label: Placeholders disappear when typing
- Don’t create keyboard traps: Ensure users can navigate away from all elements
- Don’t use non-descriptive links: Avoid “click here” or “read more”
- Don’t override user zoom: Allow text resizing and zoom
Reduced Motion
Paste respects the user’s motion preferences:- The
disableAnimationsprop is true - The user has
prefers-reduced-motionenabled
Additional Resources
Guidelines and Standards
Testing Tools
- axe DevTools: Browser extension for accessibility testing
- WAVE: Web accessibility evaluation tool
- Lighthouse: Automated auditing in Chrome DevTools
- Color Contrast Analyzer: Desktop application for contrast checking
Screen Readers
- NVDA: Free screen reader for Windows
- JAWS: Commercial screen reader for Windows
- VoiceOver: Built-in screen reader for macOS and iOS
Need Help?
If you have questions about making your Paste application more accessible:- Review component documentation for accessibility notes
- Check the WCAG guidelines for specific requirements
- Test with real assistive technologies
- Open a GitHub issue if you find accessibility issues in Paste components
Accessibility is an ongoing effort. Paste is continuously improved based on user feedback and evolving standards.