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:
@@ -156,7 +156,7 @@ function RecommendationCard({ rec, portSlug, onAdd }: RecommendationCardProps) {
|
||||
</span>
|
||||
{showHeat ? (
|
||||
<span className="inline-flex items-center gap-1 rounded-md border border-rose-200 bg-rose-50 px-2 py-0.5 text-xs font-medium text-rose-800">
|
||||
<Flame className="size-3" />
|
||||
<Flame className="size-3" aria-hidden />
|
||||
Heat {Math.round(rec.heat!.total)}
|
||||
</span>
|
||||
) : null}
|
||||
@@ -174,9 +174,9 @@ function RecommendationCard({ rec, portSlug, onAdd }: RecommendationCardProps) {
|
||||
</div>
|
||||
</div>
|
||||
{expanded ? (
|
||||
<ChevronUp className="size-4 shrink-0 text-muted-foreground" />
|
||||
<ChevronUp className="size-4 shrink-0 text-muted-foreground" aria-hidden />
|
||||
) : (
|
||||
<ChevronDown className="size-4 shrink-0 text-muted-foreground" />
|
||||
<ChevronDown className="size-4 shrink-0 text-muted-foreground" aria-hidden />
|
||||
)}
|
||||
</button>
|
||||
|
||||
@@ -213,7 +213,7 @@ function RecommendationCard({ rec, portSlug, onAdd }: RecommendationCardProps) {
|
||||
onAdd(rec);
|
||||
}}
|
||||
>
|
||||
<Plus className="mr-1.5 size-3.5" />
|
||||
<Plus className="mr-1.5 size-3.5" aria-hidden />
|
||||
Add to interest
|
||||
</Button>
|
||||
<Button asChild size="sm" variant="outline">
|
||||
@@ -375,7 +375,7 @@ export function BerthRecommenderPanel({
|
||||
<div className="flex flex-wrap items-start justify-between gap-2">
|
||||
<div className="min-w-0 space-y-1">
|
||||
<CardTitle className="flex items-center gap-2 text-base">
|
||||
<Sparkles className="size-4 text-brand-600" />
|
||||
<Sparkles className="size-4 text-brand-600" aria-hidden />
|
||||
Recommendations for {formatDesired(desiredLengthFt, desiredWidthFt, desiredDraftFt)}
|
||||
</CardTitle>
|
||||
{!hasDimensions ? (
|
||||
@@ -392,7 +392,7 @@ export function BerthRecommenderPanel({
|
||||
onClick={() => setFiltersOpen((v) => !v)}
|
||||
disabled={!hasDimensions}
|
||||
>
|
||||
<Filter className="mr-1.5 size-3.5" />
|
||||
<Filter className="mr-1.5 size-3.5" aria-hidden />
|
||||
{filtersOpen ? 'Hide filters' : 'Add filters'}
|
||||
</Button>
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user