- Issue created by @the_g_bomb
- 🇬🇧United Kingdom the_g_bomb
I suspect the following issue will be needed for to enable ai alt text to happen: 📌 Design a UI to allow various kinds of alterations to referenced Media entities in a modal Active
Current alt text generation lacks context; the same image may require different descriptions depending on its use. For example, a photo of people around a laptop should focus on the people if it's in an article about diversity, but on the laptop if it's about technology.
When an image is uploaded to the Media library, the ai_image_alt_text module provides an image description. This literal description can be useful for editors to locate an appropriate image for use with their content, but once used with content the alt text should be altered to be appropriate for the content it is now associated with.
Given that a single image can be used in multiple places, the original alt text should remain in place and the image when it is referenced, should get some new alt text.
There are articles which explain the issue, such as:
https://accessibility.huit.harvard.edu/describe-content-images
AI Image Alt text should assist in generating the new alt text, which means it needs to also consider the article in which the image has been placed.
Install Drupal CMS
Upload an image such as the image in the article above under the heading "Consider the Context"
Write 2 articles:
Note that the same alt text is now used in both cases.
The alt text for the image in each of these articles should be different to represent the images in a different context.
I have created a recipe that can be applied to Drupal CMS
https://github.com/thegbomb/article_contextual_images
This creates a new content type with a contextual image field.
This field utilises the
media_library_media_modify →
to provide a way to have alt text saved on the referenced field, but it leaves the original alt text as is.
The module is a workaround created to solve a problem outline in this core issue: ✨ [META] Improve workflows for image alternative text Active
Utilising this solution, the AI Image Alt text module should be able to ascertain if the media item is being referenced in a node and then extract content from that node to offer more context-aware alt text.
Drupal CMS has already used a focus field for SEO tools, perhaps that can be used again here. The Title certainly should be considered, along with perhaps the Summary or Content fields.
It may be best if 2 or 3 options could be offered, so that the editor can use their intention awareness and choose the most appropriate alt text.
More information regarding why accurately described alt text is not suitable can be read at:
Active
1.0
Code
I suspect the following issue will be needed for to enable ai alt text to happen: 📌 Design a UI to allow various kinds of alterations to referenced Media entities in a modal Active