microformats / metaformats

Issue tracking for the metaformats specification, an extension to the microformats2 parsing specification, for parsing invisible data published in HTML meta tags
https://microformats.org/wiki/metaformats
Creative Commons Zero v1.0 Universal
2 stars 3 forks source link

Support parsing image alt text #4

Open aciccarello opened 11 months ago

aciccarello commented 11 months ago

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.