Islandora / islandora

Drupal modules for browsing and managing digital repositories.
http://islandora.ca/
GNU General Public License v2.0
154 stars 118 forks source link

Make default media alt-text configurable #978

Open bondjimbond opened 9 months ago

bondjimbond commented 9 months ago

Overview of feature request

Currently, Islandora's approach to generating alt-text on media is to default to title, in this function: https://github.com/Islandora/islandora/blob/2.x/islandora.module#L530-L552

Request: instead of hard-coding the title as the source of the default, make it configurable, so that any field (i.e. Description) from the Repository Item content type can be used.

What kind of user is the feature intended for?

Anyone who ingests objects; also can improve accessibility (by providing a useful default for alt-text, images that aren't given manual alt-text will receive something more helpful).

What inspired the request?

Received questions about accessibility from one of our admins as we prepare to migrate to modern Islandora. Found this note in the documentation:

Automatic alt-text When creating image media, alt-text is a required attribute. An Islandora function currently automatically populates the alt-text, if that media is the "media of" a node, with the respective node's title. This is not considered good accessibility as the node's title will likely be already on the page, and it doesn't add anything to describing the image itself. Please fill out the alt text with something meaningful when adding image content to Islandora.

Configurable default fields would improve (though not fully resolve) accessibility behaviour.

What existing behavior do you want changed?

Change the default behaviour when uploading media for an Islandora object (currently uses nodeTitle by default unless handmade alt text is provided); add configuration to specify a Drupal field as the source for default alt text.

ysuarez commented 9 months ago

This issue was mentioned in this week's tech call. As part of the discussion this older existing Drupal issue was mentioned https://www.drupal.org/project/drupal/issues/1291262

bondjimbond commented 3 weeks ago

Has there been any further interest in taking action on this issue? I think it would be quite beneficial in terms of improving baseline accessibility, and it should be a fairly simple improvement to implement.

rosiel commented 3 weeks ago

Since alt text is not what's normally meant by Description in a metadata field, nor any other metadata fields we have, I propose we use alt text as Drupal intended, i.e.: