Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support parsing image alt text #4

Open
aciccarello opened this issue Dec 4, 2023 · 0 comments
Open

Support parsing image alt text #4

aciccarello opened this issue Dec 4, 2023 · 0 comments

Comments

@aciccarello
Copy link

Open Graph Protocol images can include alt text. Metaformats should include parsing this content to ensure maximum accessibility.

OGP Example

<meta property="og:image" content="https://example.com/ogp.jpg" />
<meta property="og:image:secure_url" content="https://secure.example.com/ogp.jpg" />
<meta property="og:image:type" content="image/jpeg" />
<meta property="og:image:width" content="400" />
<meta property="og:image:height" content="300" />
<meta property="og:image:alt" content="A shiny red apple with a bite taken out" />

Real world example

The Verge Article

<meta property="og:image" content="https://cdn.vox-cdn.com/thumbor/QCdO_oKAdBIZCodEUT2WCBFgQSo=/0x0:2040x1360/1200x628/filters:focal(1020x680:1021x681)/cdn.vox-cdn.com/uploads/chorus_asset/file/24390406/STK149_AI_03.jpg">
<meta property="og:image:alt" content="A rendition of OpenAI’s logo, which looks like a stylized whirlpool.">

It's worth noting that some tools/sites have intentionally not included og:image:alt due to poor usage. The Yoast Blog has a good explainer.

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

No branches or pull requests

1 participant