bluesky-social / social-app

The Bluesky Social application for Web, iOS, and Android
https://bsky.app
MIT License
11.82k stars 1.51k forks source link

Accessibility: Use ImageObject caption property as ALT text for remote embeds #6502

Open tholub opened 3 days ago

tholub commented 3 days ago

Describe the Feature

When embedding an image from a remote site (such as the featured image from a WordPress post), the image may be presented as an ImageObject. The ImageObject schema does not include a specific property for ALT text. If ALT text exists for the image on the remote site, the ImageObject may present the ALT text in the caption property.

If no source for ALT text is found, the value of the caption property should be used as the ALT text for the embedded image.

Example featured image section from a WordPress post:

Screenshot 2024-11-18 at 10 15 33 AM

Post schema section as text: <script type="application/ld+json" class="yoast-schema-graph">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","@id":"https://inl.org/1998/11/day-1-sf-to-santa-cruz/","url":"https://inl.org/1998/11/day-1-sf-to-santa-cruz/","name":"Day 1: SF to Santa Cruz - Tom&#039;s stuff","isPartOf":{"@id":"https://inl.org/#website"},"primaryImageOfPage":{"@id":"https://inl.org/1998/11/day-1-sf-to-santa-cruz/#primaryimage"},"image":{"@id":"https://inl.org/1998/11/day-1-sf-to-santa-cruz/#primaryimage"},"thumbnailUrl":"https://inl.org/wp-content/uploads/sites/3/2024/11/27908_05.sfw-3.jpg","datePublished":"1998-11-01T19:31:00+00:00","dateModified":"2024-11-18T17:44:35+00:00","author":{"@id":"https://inl.org/#/schema/person/2147ceda83fd3e40fa2c2cde2e467d79"},"breadcrumb":{"@id":"https://inl.org/1998/11/day-1-sf-to-santa-cruz/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https://inl.org/1998/11/day-1-sf-to-santa-cruz/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https://inl.org/1998/11/day-1-sf-to-santa-cruz/#primaryimage","url":"https://inl.org/wp-content/uploads/sites/3/2024/11/27908_05.sfw-3.jpg","contentUrl":"https://inl.org/wp-content/uploads/sites/3/2024/11/27908_05.sfw-3.jpg","width":1200,"height":841,"caption":"A harvested field in the foreground gives way to an ocean under a cloudy sky. In the distance, a lighthouse can be seen on the end of a point."},{"@type":"BreadcrumbList","@id":"https://inl.org/1998/11/day-1-sf-to-santa-cruz/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://inl.org/"},{"@type":"ListItem","position":2,"name":"Blog","item":"https://inl.org/blog/"},{"@type":"ListItem","position":3,"name":"Day 1: SF to Santa Cruz"}]},{"@type":"WebSite","@id":"https://inl.org/#website","url":"https://inl.org/","name":"Tom&#039;s stuff","description":"Tom Holub&#039;s web stuff","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://inl.org/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https://inl.org/#/schema/person/2147ceda83fd3e40fa2c2cde2e467d79","name":"tom","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https://inl.org/#/schema/person/image/","url":"https://secure.gravatar.com/avatar/2148aecfd4521da5be7788966f8e2ad3?s=96&d=mm&r=g","contentUrl":"https://secure.gravatar.com/avatar/2148aecfd4521da5be7788966f8e2ad3?s=96&d=mm&r=g","caption":"tom"},"url":"https://inl.org/author/tom/"}]}</script>

Attachments

No response

Describe Alternatives

No response

Additional Context

No response