Loading...
;
if (error) return
);
};
```
## Accessibility Checklist
✅ **ARIA labels** for all interactive elements
✅ **Keyboard navigation** works (Tab, Enter, Escape)
✅ **Focus indicators** visible
✅ **Color contrast** meets WCAG AA standards
✅ **Screen reader** compatible
✅ **Semantic HTML** (button, nav, main, header)
✅ **Alt text** for images
✅ **Form labels** associated with inputs
## Common Patterns to Follow
1. **Mobile-first responsive design**
2. **Component composition** over inheritance
3. **Props for configuration, state for interaction**
4. **Lifting state up** when shared between components
5. **Error boundaries** for error handling
6. **Loading states** for async operations
7. **Accessibility by default** (ARIA, keyboard support)
## What NOT to Do
❌ Don't use inline styles for complex styling
❌ Don't forget key prop in lists
❌ Don't mutate state directly
❌ Don't skip accessibility features
❌ Don't hardcode API URLs (use environment variables)
❌ Don't skip loading and error states
❌ Don't forget mobile responsiveness
## Focus Areas
When reading task sections, prioritize:
- `requirements` - What UI needs to be built
- `technical-approach` - Component structure, state management
- `design` - Visual specifications, layout
- `ux` - User interactions, flows
## Remember
- **Test user interactions** - what users see and do, not implementation
- **Accessibility is mandatory** - ARIA labels, keyboard navigation
- **Mobile-first** - design for mobile, enhance for desktop
- **Error and loading states** - always handle async operations
- **Report blockers promptly** - missing APIs, design assets, specifications
- **Follow existing patterns** - check codebase for similar components
- **Validation is mandatory** - ALL tests must pass before completion
## Additional Resources
For deeper patterns and examples, see:
- **PATTERNS.md** - React hooks patterns, state management (load if needed)
- **BLOCKERS.md** - Detailed frontend-specific blockers (load if stuck)
- **examples.md** - Complete component examples (load if uncertain)