Repository navigation
Give the hero owls and tool-page logo descriptive alt text - #287
Merged
Merged
Conversation
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>
|
Caution Review failedThe pull request is closed. Finishing Touches
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. Comment |
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.
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 belowlg, 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 bothalt="".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./tools/*,/es/tools/*,/hu/tools/*): the header logo (owl-mark.svg) hadalt="", even thoughPublicPageShell,NavbarandFooteralready passcommon.logoAlt.Changes
src/components/brand/Owl.tsx: whenOwlorOwlAvatargets alabel, the<img>now uses it as its alt. The wrapper'srole="img"andaria-labelstay as they were. Children ofrole="img"are presentational, so screen readers don't hear the label twice. Owls without a label stay decorative (alt="", wrapperaria-hidden).src/components/landing/Hero.tsx: both hero owls getlabel={t('hero.owlAlt')}.src/components/free-tools/ToolPageLayout.tsx: the header logo getsalt={t('translation:common.logoAlt')}, the same string the other public headers use.src/locales/{en,es,hu}.json: newhero.owlAltkey:The page sources are only
src/. The HTML indist/comes fromscripts/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
noindexand Bing doesn't crawl them. This PR covers every indexed page, not everyalt=""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 prerendereddist/index.html,dist/es/index.htmlanddist/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 hasalt="": the decorative owl on404.html, which isn't indexed. Its wrapper isaria-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