fix: mark decorative images as decorative - #765
Open
rickstaa wants to merge 1 commit into
Open
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
force-pushed
the
fix/image-alt-text
branch
from
August 18, 2026 10:39
25fcbeb to
34f55ec
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Lighthouse
image-altfails onmain: 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
altis 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:
IdentityAvatar(orchestrator rows, 12 per page)textTruncate(identity.name, 20)+ address badgeAccountCellidentity?.name ?? formatAddress(address)DelegatingWidget/HeaderdelegateProfile?.name ?? formatAddress(transcoder?.id)Profileheaderidentity?.name ?? formatAddress(account)/img/arbitrum.svgon 3 migrate pagesTxSummaryDialogspinneralt="loader", announced as contentNaming them would satisfy
image-altand violateimage-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, andjsx-a11y/alt-textstates 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:
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, sojsx-a11y/alt-textand@next/next/no-img-elementnever 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 (productionBrowserSourceMapsand the<meta name="description">tag) already reachedmainindependently.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.