Skip to content
Documentation
Rule catalogue

og.image.alt.caption

og:image:alt describes the image, it does not repeat the title

infoper pageguideline

Why it matters

A card is a title drawn as pixels, so the tempting alt is the title again — and it is the one description that adds nothing. Someone who cannot see the card hears the same words twice and still does not know what is in the picture. It is also invisible to the rule next door: the tag is present, so the presence check passes, and it will keep passing for as long as the page exists.

What the finding looks like

The message goflag prints, with example values substituted.

info og.image.alt.caption og:image:alt repeats the title instead of describing the image.

Say what the card shows, not what the page is called

Written for the Next.js App Router. The finding is correct on any stack; only the remedy assumes one.

// The card is a title on a background. The alt says so — once, from a
// template, so every page gets one and none of them is the title alone.
const ogAlt = (title: string) => `The title “${title}” on a dark preview card.`;

Says who?

This rule is guideline, and it cites the document below. Nothing here is goflag’s opinion of what a good page looks like — if you disagree with a finding, this is what you are disagreeing with.