import { Fragment } from 'react'; import { useQuery } from '@tanstack/react-query'; import { apiFetch, assetsUrl } from '../lib/api'; import { useHeadlessScan } from '../hooks/useHeadlessScan'; import type { ScannableUrl } from '../lib/types'; const FEATURES: { title: string; desc: string; variant: 'score' | 'severity' | 'passed' | 'ai' }[] = [ { variant: 'score', title: 'Accessibility score', desc: 'Get a clear score to understand the accessibility status of each page.', }, { variant: 'severity', title: 'Issues by severity', desc: 'See critical, serious, warning and notice issues that need attention.', }, { variant: 'passed', title: 'Passed checks', desc: 'See what’s already working well, including the number of accessibility checks passed.', }, { variant: 'ai', title: 'AI-powered fix suggestions', desc: 'Get practical, easy to follow recommendations to fix identified issues.', }, ]; const STEPS = [ { title: 'Scan', desc: 'Choose a page and run an accessibility scan.' }, { title: 'Review', desc: 'See the score, issues and recommendations.' }, { title: 'Fix', desc: 'Make the suggested changes and rescan.' }, ]; function FeatureIcon({ variant }: { variant: 'score' | 'severity' | 'passed' | 'ai' }) { if (variant === 'score') { return A; } if (variant === 'severity') { return ( ); } if (variant === 'passed') { return ( ); } return ( ); } export default function OnboardingHero() { const { scanning, startScan } = useHeadlessScan(); const { data: urls = [] } = useQuery({ queryKey: ['scannable-urls', ''], queryFn: () => apiFetch('/scannable-urls'), }); const homepage = urls.find((u) => u.type === 'home'); const isScanning = !!(homepage && scanning[homepage.url]); return (
{/* ── Welcome banner ── */}
Welcome to AccessMate

Let’s check your accessibility

Scan your pages for accessibility issues and get practical recommendations to make your website more inclusive.

Learn more