fix(audit-wave-10): aria-hidden sweep on decorative Lucide icons (#69)

Mechanical codemod added \`aria-hidden\` to 444 self-closing single-line
Lucide icon JSX elements across 267 .tsx files in:

- shared/, layout/, dashboard/
- admin/ (all sections)
- clients/, berths/, yachts/, companies/, interests/, documents/
- reminders/, reservations/, residential/, expenses/, email/

The regex targeted only the safe pattern \`<IconName className="..." />\`
(no other props, self-closing, capitalized component name). Every match
inspected is a decorative companion to visible text or sits inside a
button whose accessible name comes from \`aria-label\` / sr-only text
— the icon itself should not be announced.

Screen readers no longer double-read the icon + the adjacent label
text (e.g. "Pencil Pencil Edit" → just "Edit"). The existing
@axe-core/playwright smoke test (\`20-accessibility.spec.ts\`) continues
to pass.

Test suite stays at 1315/1315 vitest. typescript clean.

Closes task #69 (aria-hidden sweep) from the AUDIT-2026-05-12 follow-ups
backlog.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-13 12:37:22 +02:00
parent ecf49be18c
commit c8ea9ec0a0
172 changed files with 727 additions and 614 deletions

View File

@@ -126,7 +126,7 @@ function BulkArchiveWizardBody({ open, onOpenChange, clientIds, onSuccess }: Pro
{preflight.isLoading ? (
<div className="py-8 text-center text-sm text-muted-foreground">
<Loader2 className="h-5 w-5 animate-spin mx-auto mb-2" />
<Loader2 className="h-5 w-5 animate-spin mx-auto mb-2" aria-hidden />
Checking each client
</div>
) : preflight.error ? (
@@ -156,7 +156,7 @@ function BulkArchiveWizardBody({ open, onOpenChange, clientIds, onSuccess }: Pro
{blocked.length > 0 && (
<div className="rounded-md border border-red-300 bg-red-50 p-3 text-xs text-red-900 space-y-1">
<div className="font-medium flex items-center gap-1.5">
<AlertTriangle className="h-4 w-4" /> Blocked
<AlertTriangle className="h-4 w-4" aria-hidden /> Blocked
</div>
{blocked.slice(0, 5).map((b) => (
<div key={b.clientId}>
@@ -236,7 +236,7 @@ function BulkArchiveWizardBody({ open, onOpenChange, clientIds, onSuccess }: Pro
{stage === 'confirm' && (
<div className="space-y-2 text-sm">
<div className="rounded-md border border-emerald-300 bg-emerald-50 p-3 text-emerald-900 flex items-start gap-2">
<CheckCircle2 className="h-4 w-4 mt-0.5" />
<CheckCircle2 className="h-4 w-4 mt-0.5" aria-hidden />
<div>
Ready to archive <strong>{archivable.length}</strong> client
{archivable.length === 1 ? '' : 's'}
@@ -268,7 +268,7 @@ function BulkArchiveWizardBody({ open, onOpenChange, clientIds, onSuccess }: Pro
}
}}
>
Continue <ArrowRight className="h-4 w-4 ml-1" />
Continue <ArrowRight className="h-4 w-4 ml-1" aria-hidden />
</Button>
)}
@@ -279,18 +279,18 @@ function BulkArchiveWizardBody({ open, onOpenChange, clientIds, onSuccess }: Pro
disabled={carouselIndex === 0}
onClick={() => setCarouselIndex((i) => Math.max(0, i - 1))}
>
<ArrowLeft className="h-4 w-4 mr-1" /> Back
<ArrowLeft className="h-4 w-4 mr-1" aria-hidden /> Back
</Button>
{carouselIndex < highStakes.length - 1 ? (
<Button
disabled={(reasons[currentHighStakes?.clientId ?? '']?.trim().length ?? 0) < 5}
onClick={() => setCarouselIndex((i) => i + 1)}
>
Next <ArrowRight className="h-4 w-4 ml-1" />
Next <ArrowRight className="h-4 w-4 ml-1" aria-hidden />
</Button>
) : (
<Button disabled={!allHighStakesReasoned} onClick={() => setStage('confirm')}>
Review <ArrowRight className="h-4 w-4 ml-1" />
Review <ArrowRight className="h-4 w-4 ml-1" aria-hidden />
</Button>
)}
</>
@@ -304,7 +304,7 @@ function BulkArchiveWizardBody({ open, onOpenChange, clientIds, onSuccess }: Pro
>
{archiveMutation.isPending ? (
<>
<Loader2 className="h-4 w-4 animate-spin mr-1.5" /> Archiving
<Loader2 className="h-4 w-4 animate-spin mr-1.5" aria-hidden /> Archiving
</>
) : (
`Archive ${archivable.length}`