import { Meta } from 'storybook/blocks'; # Accessibility Requirements Our design system is built with accessibility as a core principle, ensuring all users can interact with our application effectively. ## Accessibility Standards We follow **WCAG 2.1 Level AA** guidelines as our minimum standard, with many components meeting AAA requirements. ### Core Principles (POUR) | Principle | Description | |-----------|-------------| | **Perceivable** | Content must be presentable in ways all users can perceive | | **Operable** | UI components must be operable by all users | | **Understandable** | Information and UI operation must be understandable | | **Robust** | Content must work with current and future assistive technologies | ## Color & Contrast ### Contrast Requirements | Content Type | Minimum Ratio | Level | |-------------|---------------|-------| | Normal text (< 18px) | 4.5:1 | AA | | Large text (≥ 18px bold or ≥ 24px) | 3:1 | AA | | UI components & graphics | 3:1 | AA | | Enhanced contrast | 7:1 | AAA | ### Tested Color Combinations All our semantic colors meet contrast requirements: ```tsx // These combinations are verified accessible

{/* 17.4:1 ✓ */}

{/* 15.4:1 ✓ */}

{/* 6.5:1 ✓ */}

{/* 5.9:1 ✓ */} ``` ### Don't Rely on Color Alone Always provide additional indicators: ```tsx // ❌ Bad: Color only indicates error // ✓ Good: Color + icon + text ``` ## Keyboard Navigation ### Focus Management All interactive elements are keyboard accessible: ```tsx // All components include focus styles ``` ### Tab Order Ensure logical tab order: ```tsx // Natural document order

{/* Tab 1 */} {/* Tab 2 */} {/* Tab 3 */}
``` ## Screen Readers ### Semantic HTML Always use semantic elements: ```tsx // ✓ Good: Semantic structure

Page Title

Section

// ❌ Bad: Div soup ``` ### ARIA Labels Provide context for screen readers: ```tsx // Button with icon only needs label // Input with label association

We'll send confirmation to this address

``` ### Live Regions Announce dynamic content: ```tsx // Announce form errors
{error &&

{error}

}
// Announce loading states
{isLoading ? 'Loading...' : 'Content loaded'}
``` ### ARIA Attributes Reference | Attribute | Usage | |-----------|-------| | `aria-label` | Provides accessible name when visible text isn't sufficient | | `aria-labelledby` | References visible element as label | | `aria-describedby` | References element providing description | | `aria-expanded` | Indicates if a collapsible element is open | | `aria-haspopup` | Indicates element opens a popup | | `aria-controls` | Identifies element being controlled | | `aria-current` | Indicates current item in a set | | `aria-selected` | Indicates selection state | | `aria-invalid` | Indicates validation state | | `aria-disabled` | Indicates disabled state | ## Form Accessibility ### Labels Every input needs an associated label: ```tsx // Built-in label support // Renders as: ``` ### Error Messages Errors are programmatically associated: ```tsx // Component renders: ``` ### Required Fields Indicate required fields clearly: ```tsx // Label shows asterisk: "Email *" ``` ### Fieldsets Group related fields: ```tsx
Shipping Address
``` ## Component-Specific Guidelines ### Button ```tsx // Accessible button ``` ### Select ```tsx // Select with proper ARIA