Web accessibility from the start — always apply semantic HTML, form labels, ARIA attributes, keyboard navigation, live regions, alt text, and heading hierarchy when building any UI component
93
90%
Does it follow best practices?
Impact
98%
1.24xAverage score across 5 eval scenarios
Passed
No known issues
A SaaS dashboard needs a reusable toast notification system to display feedback messages to users. Build it using React and TypeScript.
The system should support three notification types:
Behavior:
Provide a useToast hook that other components can use:
const { showToast } = useToast();
showToast({ type: 'success', message: 'Item created!' });
showToast({ type: 'error', message: 'Failed to delete item.' });
showToast({ type: 'info', message: 'Your session will expire in 5 minutes.' });Also build a small demo component that has three buttons (one for each toast type) to test the system.
Produce:
src/components/ToastProvider.tsx -- context provider and toast containersrc/components/Toast.tsx -- individual toast componentsrc/hooks/useToast.ts -- the hook for triggering toastssrc/components/Toast.css -- styles and animationssrc/components/ToastDemo.tsx -- demo component with trigger buttonsevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
skills
web-accessibility-essentials
verifiers