Override media fields from the reference field

Created on 3 January 2019, almost 6 years ago
Updated 23 November 2023, about 1 year ago

Problem/Motivation

When reusing the same image in different places, the alt text of the image might be different for each use. Since images could contain a lot of elements, you might want to describe different parts of the image depending on the context of how the image is used. It is currently not possible to override the canonical alt text of a media image on a per use basis. (Similarly, different tags might be needed depending on where it is used.)

As the WCAG makes a distinction between:

  • Informative Images - where the text alternative should convey the meaning or content that is displayed visually
  • Decorative Images - where a null (empty) alt text should be provided (alt="")

This is also discussed in πŸ› According to the WCAG guidelines decorative images should not have an alt-text but this is not possible Active

Proposed resolution

Add an map field to the media entity reference to store the field overrides. Note the override is per fieldand not per field_property.

Remaining tasks

Add more doxygen to the media item class, especially around the per field vs per property override.

User interface changes

API changes

Data model changes

Release notes snippet

✨ Feature request
Status

Postponed

Version

11.0 πŸ”₯

Component
MediaΒ  β†’

Last updated about 1 hour ago

Created by

πŸ‡³πŸ‡±Netherlands seanB Netherlands

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

  • Accessibility

    It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024