In Panopoly 1.x, we had the ability to override the alt and title of an image for a particular embed. Meaning, the media entity might have had a default alt and title saved on the entity, but when embedding, you'd be able to change it for just this particular embed.
The use case is where you have a media library of stock images, which may have a different alt or title in that particular context, which is needed for a properly accessible text version of the content.
In Panopoly 2.x, we don't currently have the ability to do this. However, I did Google up #2924391: [media entities] Regardless of @EntityEmbedDisplay plugin, Media entities representing a `image/*` MIME type should be able to have a per-embed `alt` and `title` which has already been merged, so perhaps this is something we can just use now?
Comments
Comment #2
kerasai commentedWow, entity_embed is a very active project at the moment.
I've found that the 8.x-1.0-rc2 release is at the point where #2924391: [media entities] Regardless of @EntityEmbedDisplay plugin, Media entities representing a `image/*` MIME type should be able to have a per-embed `alt` and `title` was committed--the second of two commits. I'll test with that.
Comment #3
kerasai commentedI tested this, and it works well.
Things we'll need to do to implement this:
media.panopoly_media_image.field_media_imagefield to allow title input on image uploadspanopoly_wysiwygto allow alt and title attributes on<drupal-entity>tags. I think this only applies topanopoly_wysiwyg_basic.Patch to come.