Skip to content

Commit 34f55ec

Browse files
rickstaaRoaring30sclaude
committed
fix: mark decorative images as decorative
Seven images either carried no alt attribute, so screen readers announced their URL, or carried text that repeated the name printed beside them. Every one of them sits next to the identity it depicts, so give them an empty alt and let assistive technology skip them. Lighthouse image-alt goes from 12 failures to zero on the home page and from 1 to zero on the migrate pages. Co-Authored-By: Sebastian <115311276+Roaring30s@users.noreply.github.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 5708507 commit 34f55ec

8 files changed

Lines changed: 8 additions & 4 deletions

File tree

components/AccountCell/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ const Index = ({ active, address }) => {
5050
borderColor: "$neutral5",
5151
}}
5252
src={identity.avatar}
53+
alt=""
5354
/>
5455
) : (
5556
<QRCodeCanvas

components/DelegatingWidget/Header.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ const Header = ({
4242
height: 40,
4343
}}
4444
src={delegateProfile.avatar}
45+
alt=""
4546
/>
4647
) : (
4748
<QRCodeCanvas

components/IdentityAvatar/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ const IdentityAvatar = ({ identity, address, size = 24, css = {} }: Props) => {
8282
transition: "opacity 150ms ease",
8383
}}
8484
src={avatarSrc}
85+
alt=""
8586
onLoad={() => setImageLoaded(true)}
8687
onError={() => setHasAvatarError(true)}
8788
/>

components/Profile/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ const Index = ({
104104
height: "100%",
105105
}}
106106
src={identity.avatar}
107+
alt=""
107108
/>
108109
) : (
109110
<Box

components/TxSummaryDialog/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const Index = () => {
5555
<Box
5656
as="img"
5757
src="/img/green-loader.svg"
58-
alt="loader"
58+
alt=""
5959
css={{
6060
animation: `${rotate} 2s linear`,
6161
animationIterationCount: "infinite",

pages/migrate/broadcaster.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ const MigrateBroadcaster = () => {
739739

740740
{state.image && (
741741
<Box css={{ textAlign: "center", marginBottom: "$5" }}>
742-
<Box as="img" src={state.image} />
742+
<Box as="img" src={state.image} alt="" />
743743
</Box>
744744
)}
745745

pages/migrate/delegator/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ const MigrateUndelegatedStake = () => {
747747

748748
{state.image && (
749749
<Box css={{ textAlign: "center", marginBottom: "$5" }}>
750-
<Box as="img" src={state.image} />
750+
<Box as="img" src={state.image} alt="" />
751751
</Box>
752752
)}
753753

pages/migrate/orchestrator.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ const MigrateOrchestrator = () => {
710710

711711
{state.image && (
712712
<Box css={{ textAlign: "center", marginBottom: "$5" }}>
713-
<Box as="img" src={state.image} />
713+
<Box as="img" src={state.image} alt="" />
714714
</Box>
715715
)}
716716

0 commit comments

Comments
 (0)