Skip to content

Make default media alt-text configurable #978

@bondjimbond

Description

@bondjimbond

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions