Skip to content

fix: mark decorative images as decorative - #765

Open
rickstaa wants to merge 1 commit into
mainfrom
fix/image-alt-text
Open

fix: mark decorative images as decorative#765
rickstaa wants to merge 1 commit into
mainfrom
fix/image-alt-text

Conversation

@rickstaa

@rickstaa rickstaa commented Aug 18, 2026

Copy link
Copy Markdown
Member

Problem

Lighthouse image-alt fails on main: 12 nodes on / and 1 on each migrate page. Two further images had no alt but never rendered on an audited route, and one carried alt text that is announced as content.

A missing alt is not neutral — assistive technology falls back to the source, so the home page announces "slash api slash ens-data slash image slash novignis dot eth" twelve times.

Fix

Empty alt on all seven, because every one of them sits beside the text it depicts:

Image Adjacent text
IdentityAvatar (orchestrator rows, 12 per page) textTruncate(identity.name, 20) + address badge
AccountCell identity?.name ?? formatAddress(address)
DelegatingWidget/Header delegateProfile?.name ?? formatAddress(transcoder?.id)
Profile header identity?.name ?? formatAddress(account)
/img/arbitrum.svg on 3 migrate pages title reads "Migrate Orchestrator to Arbitrum One"
TxSummaryDialog spinner previously alt="loader", announced as content

Naming them would satisfy image-alt and violate image-redundant-alt: a row would announce as "novignis.eth avatar, novignis.eth, 0x0074…". WCAG 1.1.1 and the W3C WAI images tutorial both put "information already provided by adjacent text" in the decorative bucket, and jsx-a11y/alt-text states it directly: "either with meaningful text, or an empty string for decorative images".

alt="" is still a real change — it is an explicit presentational declaration that passes the audit, unlike an absent attribute.

Verification

Lighthouse on this branch:

/                      score=1  Image elements have [alt] attributes
/migrate/orchestrator  score=1  Image elements have [alt] attributes

Home accessibility score 0.81 → 0.86. pnpm lint, pnpm typecheck, pnpm format:check, pnpm test (121/121).

Notes

Lint cannot catch this class of bug here: these are <Box as="img"> Stitches components, so jsx-a11y/alt-text and @next/next/no-img-element never see an image element. Only a rendered audit does.

First of five PRs splitting #509. Original work by @Roaring30s, credited via Co-Authored-By. Two other parts of #509 (productionBrowserSourceMaps and the <meta name="description"> tag) already reached main independently.

Remaining Lighthouse accessibility failures on /, out of scope here: link-name (the logo anchor), landmark-one-main, aria-allowed-attr, color-contrast, td-has-header.

@rickstaa
rickstaa requested a review from ECWireless as a code owner August 18, 2026 08:57
Copilot AI lite review requested due to automatic review settings August 18, 2026 08:57
@vercel

vercel Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
explorer-arbitrum-one Ready Ready Preview Aug 18, 2026 10:41am

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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>
@rickstaa
rickstaa force-pushed the fix/image-alt-text branch from 25fcbeb to 34f55ec Compare August 18, 2026 10:39
@rickstaa rickstaa changed the title fix: add alt text to avatar and migration diagram images fix: mark decorative images as decorative Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants