From 136f6f057cd84fc3103b8f520e76c0e629d13c2f Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Thu, 24 Jul 2025 21:27:58 +0300 Subject: [PATCH] Deleted default svg title This is just bad UX than a11y. Most of the time icons are used with contextual text but if stand-alone we should provide a better name in the context of the feature rather than a generic one. --- app/components/icons/Admin.tsx | 1 - app/components/icons/Alert.tsx | 1 - app/components/icons/ArchiveBox.tsx | 1 - app/components/icons/ArrowDownOnSquare.tsx | 1 - app/components/icons/ArrowLeft.tsx | 1 - app/components/icons/ArrowLongLeft.tsx | 2 +- app/components/icons/ArrowRight.tsx | 1 - app/components/icons/ArrowUpOnSquare.tsx | 1 - app/components/icons/ArrowsPointingIn.tsx | 1 - app/components/icons/BSKYLike.tsx | 1 - app/components/icons/BSKYReply.tsx | 1 - app/components/icons/BSKYRepost.tsx | 1 - app/components/icons/Battlefy.tsx | 1 - app/components/icons/Beaker.tsx | 2 +- app/components/icons/BeakerFilled.tsx | 1 - app/components/icons/Bell.tsx | 1 - app/components/icons/Bsky.tsx | 1 - app/components/icons/Calendar.tsx | 1 - app/components/icons/ChartBar.tsx | 1 - app/components/icons/Chat.tsx | 1 - app/components/icons/CheckIn.tsx | 1 - app/components/icons/Checkmark.tsx | 2 +- app/components/icons/ChevronUpDown.tsx | 1 - app/components/icons/Clipboard.tsx | 1 - app/components/icons/Clock.tsx | 1 - app/components/icons/Cross.tsx | 2 +- app/components/icons/Discord.tsx | 1 - app/components/icons/Download.tsx | 1 - app/components/icons/Edit.tsx | 2 +- app/components/icons/Error.tsx | 1 - app/components/icons/External.tsx | 1 - app/components/icons/Eye.tsx | 1 - app/components/icons/EyeSlash.tsx | 1 - app/components/icons/Filter.tsx | 1 - app/components/icons/FilterFilled.tsx | 1 - app/components/icons/Fire.tsx | 1 - app/components/icons/GitHub.tsx | 1 - app/components/icons/Hamburger.tsx | 1 - app/components/icons/Heart.tsx | 1 - app/components/icons/Key.tsx | 1 - app/components/icons/Link.tsx | 1 - app/components/icons/Lock.tsx | 1 - app/components/icons/LogIn.tsx | 1 - app/components/icons/LogOut.tsx | 1 - app/components/icons/Map.tsx | 1 - app/components/icons/MegaphoneIcon.tsx | 1 - app/components/icons/Microphone.tsx | 1 - app/components/icons/MicrophoneFilled.tsx | 1 - app/components/icons/Minus.tsx | 1 - app/components/icons/Patreon.tsx | 1 - app/components/icons/Pick.tsx | 1 - app/components/icons/Plus.tsx | 1 - app/components/icons/Puzzle.tsx | 1 - app/components/icons/Refresh.tsx | 1 - app/components/icons/RefreshArrows.tsx | 1 - app/components/icons/Scale.tsx | 1 - app/components/icons/Search.tsx | 1 - app/components/icons/Sort.tsx | 1 - app/components/icons/Speaker.tsx | 1 - app/components/icons/SpeakerFilled.tsx | 1 - app/components/icons/SpeakerX.tsx | 1 - app/components/icons/SpeechBubble.tsx | 1 - app/components/icons/SpeechBubbleFilled.tsx | 1 - app/components/icons/Star.tsx | 1 - app/components/icons/StarFilled.tsx | 1 - app/components/icons/Success.tsx | 1 - app/components/icons/Trash.tsx | 1 - app/components/icons/Trophy.tsx | 2 +- app/components/icons/Twitch.tsx | 1 - app/components/icons/Undo.tsx | 1 - app/components/icons/Unlink.tsx | 1 - app/components/icons/Unlock.tsx | 1 - app/components/icons/Upload.tsx | 1 - app/components/icons/User.tsx | 1 - app/components/icons/Users.tsx | 1 - app/components/icons/YouTube.tsx | 1 - biome.json | 3 ++- 77 files changed, 8 insertions(+), 77 deletions(-) diff --git a/app/components/icons/Admin.tsx b/app/components/icons/Admin.tsx index 4860e265c..0a22b8917 100644 --- a/app/components/icons/Admin.tsx +++ b/app/components/icons/Admin.tsx @@ -6,7 +6,6 @@ export function AdminIcon({ className }: { className?: string }) { viewBox="0 0 20 20" fill="currentColor" > - Admin Icon - Alert Icon - Archive Box Icon - Arrow Down On Square Icon ); diff --git a/app/components/icons/ArrowLeft.tsx b/app/components/icons/ArrowLeft.tsx index 5071d98f3..bc4ce4812 100644 --- a/app/components/icons/ArrowLeft.tsx +++ b/app/components/icons/ArrowLeft.tsx @@ -15,7 +15,6 @@ export function ArrowLeftIcon({ viewBox="0 0 20 20" fill="currentColor" > - Arrow Left Icon - {title ?? "Arrow Long Left Icon"} + {title ? {title} : null} - Arrow Right Icon - Arrow Up On Square Icon ); diff --git a/app/components/icons/ArrowsPointingIn.tsx b/app/components/icons/ArrowsPointingIn.tsx index cbbc525f5..e0e6c957c 100644 --- a/app/components/icons/ArrowsPointingIn.tsx +++ b/app/components/icons/ArrowsPointingIn.tsx @@ -8,7 +8,6 @@ export function ArrowsPointingInIcon({ className }: { className?: string }) { stroke="currentColor" className={className} > - Arrows Pointing In Icon - Like Icon - Reply Icon - Repost Icon - Battlefy Icon - {title ?? "Beaker Icon"} + {title ? {title} : null} - Beaker Filled Icon - Bell Icon - Bluesky butterfly logo - Calendar Icon - Chart Bar Icon - Chat Icon - Check-In Icon diff --git a/app/components/icons/Checkmark.tsx b/app/components/icons/Checkmark.tsx index 755f76f22..fcd6a0a0a 100644 --- a/app/components/icons/Checkmark.tsx +++ b/app/components/icons/Checkmark.tsx @@ -18,7 +18,7 @@ export function CheckmarkIcon({ data-testid={testId} onClick={onClick} > - {title ?? "Checkmark Icon"} + {title ? {title} : null} - Chevron Up Down Icon - Clipboard Icon - Clock Icon - {title ?? "Cross Icon"} + {title ? {title} : null} - Discord Icon ); diff --git a/app/components/icons/Download.tsx b/app/components/icons/Download.tsx index e0eecec29..8830b3403 100644 --- a/app/components/icons/Download.tsx +++ b/app/components/icons/Download.tsx @@ -8,7 +8,6 @@ export function DownloadIcon({ className }: { className?: string }) { stroke="currentColor" className={className} > - Download Icon - {title ?? "Edit Icon"} + {title ? {title} : null} - Error Icon - External Link Icon - Eye Icon - Eye Slash Icon - Filter Icon - Filter Icon - Fire Icon - GitHub Icon ); diff --git a/app/components/icons/Hamburger.tsx b/app/components/icons/Hamburger.tsx index 1f2e4e9a5..b6fb90889 100644 --- a/app/components/icons/Hamburger.tsx +++ b/app/components/icons/Hamburger.tsx @@ -8,7 +8,6 @@ export function HamburgerIcon({ className }: { className?: string }) { stroke="currentColor" className={className} > - Hamburger icon - Heart Icon ); diff --git a/app/components/icons/Key.tsx b/app/components/icons/Key.tsx index add172071..46070469f 100644 --- a/app/components/icons/Key.tsx +++ b/app/components/icons/Key.tsx @@ -6,7 +6,6 @@ export function KeyIcon({ className }: { className?: string }) { fill="currentColor" className={className} > - Key Icon - Link Icon - Lock Icon - Login Icon - LogOut Icon - Map Icon - Megaphone Icon ); diff --git a/app/components/icons/Microphone.tsx b/app/components/icons/Microphone.tsx index 682fec186..6daa86584 100644 --- a/app/components/icons/Microphone.tsx +++ b/app/components/icons/Microphone.tsx @@ -8,7 +8,6 @@ export function MicrophoneIcon({ className }: { className?: string }) { stroke="currentColor" className={className} > - Microphone Icon - Microphone Filled Icon diff --git a/app/components/icons/Minus.tsx b/app/components/icons/Minus.tsx index bac304da3..577fb74ef 100644 --- a/app/components/icons/Minus.tsx +++ b/app/components/icons/Minus.tsx @@ -7,7 +7,6 @@ export function MinusIcon({ className }: { className?: string }) { viewBox="0 0 24 24" stroke="currentColor" > - Minus Icon - Patreon Icon ); diff --git a/app/components/icons/Pick.tsx b/app/components/icons/Pick.tsx index c4aa5a210..e104f9c3c 100644 --- a/app/components/icons/Pick.tsx +++ b/app/components/icons/Pick.tsx @@ -8,7 +8,6 @@ export function PickIcon({ className }: { className?: string }) { stroke="currentColor" className={className} > - Pick Icon - Plus Icon - Puzzle Icon ); diff --git a/app/components/icons/Refresh.tsx b/app/components/icons/Refresh.tsx index 9f67172e3..399830992 100644 --- a/app/components/icons/Refresh.tsx +++ b/app/components/icons/Refresh.tsx @@ -7,7 +7,6 @@ export function RefreshIcon({ className }: { className?: string }) { viewBox="0 0 24 24" stroke="currentColor" > - Refresh Icon - Refresh Arrows Icon - Scale Icon - Search Icon - Sort Icon - Speaker Icon - Speaker Filled Icon diff --git a/app/components/icons/SpeakerX.tsx b/app/components/icons/SpeakerX.tsx index ab6f96d85..445a1c3df 100644 --- a/app/components/icons/SpeakerX.tsx +++ b/app/components/icons/SpeakerX.tsx @@ -8,7 +8,6 @@ export function SpeakerXIcon({ className }: { className?: string }) { stroke="currentColor" className={className} > - Speaker X Icon - Speech Bubble Icon - Speech Bubble Filled Icon - Star Icon - Star Filled Icon - Success Icon - Trash Icon - {title ?? "Trophy Icon"} + {title ? {title} : null} - Twitch Icon ); diff --git a/app/components/icons/Undo.tsx b/app/components/icons/Undo.tsx index 9ceb32133..4ee8b77b5 100644 --- a/app/components/icons/Undo.tsx +++ b/app/components/icons/Undo.tsx @@ -6,7 +6,6 @@ export default function UndoIcon({ className }: { className?: string }) { fill="currentColor" className={className} > - Undo Icon - Unlink Icon - Unlock Icon ); diff --git a/app/components/icons/Upload.tsx b/app/components/icons/Upload.tsx index fa329c996..7fdef2942 100644 --- a/app/components/icons/Upload.tsx +++ b/app/components/icons/Upload.tsx @@ -8,7 +8,6 @@ export function UploadIcon({ className }: { className?: string }) { stroke="currentColor" className={className} > - Upload Icon - User Icon - Users Icon ); diff --git a/app/components/icons/YouTube.tsx b/app/components/icons/YouTube.tsx index 4dde26187..a48a4d5f8 100644 --- a/app/components/icons/YouTube.tsx +++ b/app/components/icons/YouTube.tsx @@ -8,7 +8,6 @@ export function YouTubeIcon({ className }: { className?: string }) { xmlns="http://www.w3.org/2000/svg" className={className} > - YouTube Icon ); diff --git a/biome.json b/biome.json index 5fee539ba..8e72f09df 100644 --- a/biome.json +++ b/biome.json @@ -42,7 +42,8 @@ }, "a11y": { "useKeyWithClickEvents": "off", - "noLabelWithoutControl": "off" + "noLabelWithoutControl": "off", + "noSvgWithoutTitle": "off" }, "complexity": { "useLiteralKeys": {