Skip to content

Give the hero owls and tool-page logo descriptive alt text - #287

Merged
Programcode merged 1 commit into
mainfrom
t3/homepage-img-alt
Oct 30, 2026
Merged

Programcode merged 1 commit into
mainfrom
t3/homepage-img-alt

Conversation

@Programcode

Copy link
Copy Markdown
Owner

Bing Webmaster Tools flagged 2 images on https://debateowl.com/ with missing alt text. Both are the pointing owl in the hero (owl-point.svg). One is the 88px owl shown below lg, the other the 140px owl next to the product preview. Both are always in the HTML (one is CSS-hidden at each breakpoint), which is why Bing counted 2. The prerendered page gave both alt="".

I scanned all 62 sitemap URLs on the live site for <img> tags without a non-empty alt. Two sets turned up:

  • /, /es, /hu: the two hero owls.
  • All 15 free-tool pages (/tools/*, /es/tools/*, /hu/tools/*): the header logo (owl-mark.svg) had alt="", even though PublicPageShell, Navbar and Footer already pass common.logoAlt.

Changes

  • src/components/brand/Owl.tsx: when Owl or OwlAvatar gets a label, the <img> now uses it as its alt. The wrapper's role="img" and aria-label stay as they were. Children of role="img" are presentational, so screen readers don't hear the label twice. Owls without a label stay decorative (alt="", wrapper aria-hidden).
  • src/components/landing/Hero.tsx: both hero owls get label={t('hero.owlAlt')}.
  • src/components/free-tools/ToolPageLayout.tsx: the header logo gets alt={t('translation:common.logoAlt')}, the same string the other public headers use.
  • src/locales/{en,es,hu}.json: new hero.owlAlt key:
    • en: "The owl, pointing you to the app"
    • es: "El búho, señalándote la app"
    • hu: "A bagoly az alkalmazásra mutat"

The page sources are only src/. The HTML in dist/ comes from scripts/prerender.mjs, and nothing generated was edited by hand.

Out of scope: owls inside the app (empty states, loaders, the app footer mark). Those routes are noindex and Bing doesn't crawl them. This PR covers every indexed page, not every alt="" in the codebase.

Checks

Ran locally at this head with NODE_OPTIONS=--max-old-space-size=3072, all passing:

  • npm run build (Vite, prerender, sitemap and site/link checks). In the prerendered dist/index.html, dist/es/index.html and dist/hu/index.html, both hero owls now carry the alt in the page language, and the free-tool pages carry the localized logo alt. Across all prerendered HTML, only one image still has alt="": the decorative owl on 404.html, which isn't indexed. Its wrapper is aria-hidden, so I left it.
  • npm test (94 guards, including catalog parity), npm run lint, npm run typecheck.

Skipped, per the request for light checks: npm run verify, the e2e and browser suites, verify-debatelab. CI runs on this PR.

Draft on purpose. Adam asked for a draft PR only, so the low-risk auto-merge rule does not apply here even though every changed file is under src/.

🤖 Generated with Claude Code

Bing flagged two images on the homepage with missing alt: the pointing
owl in the hero, which renders twice (one per breakpoint). Owl and
OwlAvatar now put their label on the <img> as alt, and the hero passes a
localized hero.owlAlt. The free-tool header logo had the same gap on all
15 tool pages; it now uses common.logoAlt like the other public headers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Programcode
Programcode marked this pull request as ready for review October 30, 2026 19:36
Copilot AI balanced review requested due to automatic review settings October 30, 2026 19:36
@Programcode
Programcode merged commit 7f408d2 into main Oct 30, 2026
3 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

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 insufficient remaining quota. Try requesting a review at a lower effort level.

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