This is a follow-up to https://github.com/backdrop/backdrop-issues/issues/2632.

In Drupal 7's file entity module, there were Alt and Title fields added to the image file type, but these were never closely integrated. Should we add them back, for feature parity with D7?

(Anyone upgrading from Drupal 7 will have their old fields upgraded, so the question here is only about new installs of Backdrop.)

If so, we should integrate these fields more closely with the Alt and Title fields on Image fields, or in the Rich Text Editor.

ADVOCATE: @yorkshire-pudding Agreed functional specification is detailed here: https://github.com/backdrop/backdrop-issues/issues/4007#issuecomment-130...

Here is an attempt to summarise the agreed approach; this is from the user perspective and does not determine any technical direction (added here on request from @jenlampton :

1. Image added to site via node edit

As a site editor I want to add an image globally when I add to a node So that my workflow for adding images is the same as now

AC1.1 Given that I have added an image to a node And I have added alt text and/or a title to the image When I view the image under 'Manage Files' Then I can see the alt text and/or title that I added at the node

AC1.2 Given that I have added a new image via node edit When I edit that node in future Then the checkbox "Use default alt and title text" is checked and the text fields are disabled.

2. Image added to site via manage files

As a site editor or site architect I want to add some images globally from the manage files dialog and add alt text and/or titles at this location So that I can add common images that can be used by multiple editors and have them use consistent text

AC2.1 Given that I am adding an image from Manage Files > Add a file When I've uploaded the image Then I am presented with Alt text and title fields

AC2.2 Given that I have added an image with alt and title text at Manage Files > Add a file When I view the image in the files listing and click on it to view the record Then I can also see the alt and title fields

3. Reusing an image on another node

As a site editor I want to be able to reuse the alt and title image from an existing image and be able to override the text if necessary So that I can save time when re-using an image and ensure consistent text where necessary.

AC3.1 Given that I have selected to add an image from the library When the library opens Then I can choose to search using the alt text and/or image title

AC3.2 Given that I have selected an image from the library When I return to the node screen Then I am presented with: - A checked checkbox with the label "Use default alt and title text" - The text box for alt text should be populated with the default alt text and should be disabled - The text box for image title should be populated with the default image title and should be disabled

AC3.3 Given that I have selected an image from the library And returned to the node screen And chosen not to override the default alt and title text When I save the node Then the image is presented with the default alt and title text

AC3.4 Given that I have selected an image from the library And returned to the node screen When I uncheck the "Use default alt and title text" checkbox Then the alt text and title text boxes are enabled And the default alt text and title text remains in place And I can override all or part of the default text in the usual way

AC3.5 Given that I have selected an image from the library And I have selected not to use default alt text and title text And overridden all or part of the default text When I save the node Then the image is presented with the overriden alt and title text

AC3.6 Given that I have selected an image from the library And I have selected not to use default alt text and title text And overridden all or part of the default text When I re-check the checkbox to use default alt text and title text Then the alt text and title text boxes are re-populated with the default text And the text boxes are disabled.

4. Amend global alt and title text for image

As a site architect or editor I want to edit the alt text and title text for an image and have it apply to all nodes using that image with the default text So that I can reflect changes quickly and avoid repetitive editing

AC4.1 Given that I found opened the file record from Manage Files When I edit the alt text and/or title text And save the file record Then the record is updated And all instances of the image where the default is used are updated to use the new alt and title text And any cached versions of those instances are updated And all instances of the image where the default is not used are unchanged.

AC4.2 Given that I am editing a node that includes an image that uses the default alt text and title text And I have permissions to manage files When I view the image field Then I can see a link (e.g. "Update the default information for this image") And the link takes me directly to the edit form for that file

5. User upgrades site with existing images

As a site owner I want to update Backdrop to the version that includes this feature and have it use existing information to populate the global list So that I can use the functionality on existing images without lots of additional work

AC5.1 Given that I have updated to the Backdrop version with this feature in When I view images that are only used once Then the global alt and title text are taken from the node where they are used.

AC5.2 Given that I have updated to the Backdrop version with this feature in When I view images that are used more than once Then the global alt and title text are taken from the node where they were first entered

GitHub Issue #: 
4007