Open Graph image alt

The social media preview image has alt text for screen readers.

On this page

Impact

ScanGov impact ratings

About

The Open Graph image alt tag provides alternative text for the image specified in the Open Graph protocol. This helps improve accessibility for users with visual impairments, as screen readers can describe the image content. Additionally, providing alt text ensures that the content of the image is still conveyed in cases where the image cannot be loaded or viewed, contributing to a better user experience and broader reach.

Risks

Screen readers cannot describe shared images.

Why it's important

Provides a description for the image, improving accessibility and helping search engines understand the image content.

User stories

As a site visitor, I want the image shared on social media to have an alt text so that I can understand the content of the image even if I can't see it, especially if I rely on screen readers.

Code

Add inside <head>:

<meta property="og:image:alt" content="Description of the share image">

Error

ScanGov messaging when a site fails a standard:

Open Graph image alt is missing.

Guidance

Indicators

On this page