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:
@@ -220,7 +220,7 @@ function BypassDialog({ row, open, onOpenChange, onSubmit, isPending }: BypassDi
|
||||
onClick={() => onSubmit(reason.trim().length > 0 ? reason.trim() : null)}
|
||||
disabled={isPending || reason.trim().length === 0}
|
||||
>
|
||||
{isPending ? <Loader2 className="mr-1.5 size-3.5 animate-spin" /> : null}
|
||||
{isPending ? <Loader2 className="mr-1.5 size-3.5 animate-spin" aria-hidden /> : null}
|
||||
Save bypass
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
@@ -266,7 +266,7 @@ function LinkedBerthRowItem({ row, portSlug, eoiStatus, onUpdate, onRemove, isPe
|
||||
<StatusPill status={statusToPill(row.status)}>{formatStatus(row.status)}</StatusPill>
|
||||
{row.isPrimary ? (
|
||||
<span className="inline-flex items-center gap-1 rounded-md border border-brand-200 bg-brand-50 px-2 py-0.5 text-xs font-medium text-brand-800">
|
||||
<Star className="size-3" />
|
||||
<Star className="size-3" aria-hidden />
|
||||
Primary
|
||||
</span>
|
||||
) : null}
|
||||
@@ -287,7 +287,7 @@ function LinkedBerthRowItem({ row, portSlug, eoiStatus, onUpdate, onRemove, isPe
|
||||
onClick={() => onUpdate(row.berthId, { isPrimary: true })}
|
||||
disabled={isPending}
|
||||
>
|
||||
<Star className="mr-1.5 size-3.5" />
|
||||
<Star className="mr-1.5 size-3.5" aria-hidden />
|
||||
Set as primary
|
||||
</Button>
|
||||
) : null}
|
||||
@@ -300,7 +300,7 @@ function LinkedBerthRowItem({ row, portSlug, eoiStatus, onUpdate, onRemove, isPe
|
||||
className="text-destructive hover:text-destructive"
|
||||
aria-label={`Remove berth ${row.mooringNumber ?? row.berthId}`}
|
||||
>
|
||||
<Trash2 className="size-3.5" />
|
||||
<Trash2 className="size-3.5" aria-hidden />
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -334,7 +334,7 @@ function LinkedBerthRowItem({ row, portSlug, eoiStatus, onUpdate, onRemove, isPe
|
||||
className="inline-flex h-5 w-5 items-center justify-center rounded-full text-muted-foreground hover:bg-muted/60 hover:text-foreground"
|
||||
aria-label="What does Specifically pitching do?"
|
||||
>
|
||||
<HelpCircle className="h-3.5 w-3.5" />
|
||||
<HelpCircle className="h-3.5 w-3.5" aria-hidden />
|
||||
</button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="top" className="max-w-xs text-[11px] leading-snug">
|
||||
@@ -369,7 +369,7 @@ function LinkedBerthRowItem({ row, portSlug, eoiStatus, onUpdate, onRemove, isPe
|
||||
className="inline-flex h-5 w-5 items-center justify-center rounded-full text-muted-foreground hover:bg-muted/60 hover:text-foreground"
|
||||
aria-label="What does Mark in EOI bundle do?"
|
||||
>
|
||||
<HelpCircle className="h-3.5 w-3.5" />
|
||||
<HelpCircle className="h-3.5 w-3.5" aria-hidden />
|
||||
</button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="top" className="max-w-xs text-[11px] leading-snug">
|
||||
@@ -484,7 +484,7 @@ export function LinkedBerthsList({ interestId }: LinkedBerthsListProps) {
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle className="flex items-center gap-2 text-base">
|
||||
<Anchor className="size-4 text-brand-600" />
|
||||
<Anchor className="size-4 text-brand-600" aria-hidden />
|
||||
Linked berths{rows.length > 0 ? ` (${rows.length})` : ''}
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
|
||||
Reference in New Issue
Block a user