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:
@@ -114,15 +114,15 @@ export function InterestContactLogTab({ interestId }: InterestContactLogTabProps
|
||||
</p>
|
||||
</div>
|
||||
<Button size="sm" onClick={() => setComposeOpen(true)} className="gap-1.5">
|
||||
<Plus className="size-4" />
|
||||
<Plus className="size-4" aria-hidden />
|
||||
Log contact
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
{isLoading ? (
|
||||
<div className="space-y-2">
|
||||
<Skeleton className="h-20 rounded-lg" />
|
||||
<Skeleton className="h-20 rounded-lg" />
|
||||
<Skeleton className="h-20 rounded-lg" aria-hidden />
|
||||
<Skeleton className="h-20 rounded-lg" aria-hidden />
|
||||
</div>
|
||||
) : entries.length === 0 ? (
|
||||
<EmptyState onAdd={() => setComposeOpen(true)} />
|
||||
@@ -183,7 +183,7 @@ function ContactLogRow({
|
||||
channelMeta.tone,
|
||||
)}
|
||||
>
|
||||
<Icon className="size-3.5" />
|
||||
<Icon className="size-3.5" aria-hidden />
|
||||
</span>
|
||||
<div className="min-w-0 flex-1 space-y-1.5">
|
||||
<div className="flex items-center gap-2 flex-wrap">
|
||||
@@ -201,7 +201,7 @@ function ContactLogRow({
|
||||
<p className="text-sm text-foreground whitespace-pre-wrap">{entry.summary}</p>
|
||||
{entry.followUpAt && (
|
||||
<p className="inline-flex items-center gap-1.5 rounded-md border border-amber-200 bg-amber-50 px-2 py-0.5 text-xs text-amber-900">
|
||||
<Bell className="size-3" />
|
||||
<Bell className="size-3" aria-hidden />
|
||||
Follow up {format(new Date(entry.followUpAt), 'MMM d, yyyy')} (reminder created)
|
||||
</p>
|
||||
)}
|
||||
@@ -209,12 +209,12 @@ function ContactLogRow({
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button variant="ghost" size="icon" className="h-7 w-7" aria-label="Row actions">
|
||||
<MoreVertical className="h-4 w-4" />
|
||||
<MoreVertical className="h-4 w-4" aria-hidden />
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="end">
|
||||
<DropdownMenuItem onClick={() => onEdit(entry)}>
|
||||
<Pencil className="mr-2 size-3.5" />
|
||||
<Pencil className="mr-2 size-3.5" aria-hidden />
|
||||
Edit
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem
|
||||
@@ -229,7 +229,7 @@ function ContactLogRow({
|
||||
if (ok) deleteMutation.mutate();
|
||||
}}
|
||||
>
|
||||
<Trash2 className="mr-2 size-3.5" />
|
||||
<Trash2 className="mr-2 size-3.5" aria-hidden />
|
||||
Delete
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuContent>
|
||||
@@ -246,7 +246,7 @@ function EmptyState({ onAdd }: { onAdd: () => void }) {
|
||||
return (
|
||||
<div className="rounded-xl border border-dashed bg-muted/20 p-8 text-center">
|
||||
<div className="mx-auto flex size-12 items-center justify-center rounded-full bg-background text-muted-foreground">
|
||||
<Phone className="size-5" />
|
||||
<Phone className="size-5" aria-hidden />
|
||||
</div>
|
||||
<h3 className="mt-3 text-sm font-medium text-foreground">No contact logged yet</h3>
|
||||
<p className="mt-1 text-xs text-muted-foreground">
|
||||
@@ -254,7 +254,7 @@ function EmptyState({ onAdd }: { onAdd: () => void }) {
|
||||
picks up the deal.
|
||||
</p>
|
||||
<Button size="sm" onClick={onAdd} className="mt-4 gap-1.5">
|
||||
<Plus className="size-3.5" />
|
||||
<Plus className="size-3.5" aria-hidden />
|
||||
Log first contact
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user