Skip to content

[PURR][#2768]Allow submitter to provide the image description#1868

Open
kuang5 wants to merge 1 commit intohubzero:2.4-mainfrom
kuang5:kuang_local_hub_03202026
Open

[PURR][#2768]Allow submitter to provide the image description#1868
kuang5 wants to merge 1 commit intohubzero:2.4-mainfrom
kuang5:kuang_local_hub_03202026

Conversation

@kuang5
Copy link
Contributor

@kuang5 kuang5 commented Mar 20, 2026

PURR Ticket: https://purr.purdue.edu/support/ticket/2768

Currently the alt attribute value in img tag, as example shown below, for displaying gallery image on publication page is just file name which is not meaningful. We want publication submitter provide a specific description to the image so that it is able to be understood by screen readers that improves the accessibility.

Picture1.jpg

The code changes includes adding a text field for user to enter the image description which is going to be set to alt attribute in img tag on publication page, allowing PURR administrator add or change the image description through admin interface, providing a link to the file accessibility document for publication submitter to understand the importance and how to add the description. The attribs column in publication attachment table is never used, so I use it to store the image description.

Test steps:

  1. Start a publication, add image to the gallery section in the Extra block. Click the "Edit properties" and enter the description to the image in the File description text field, then save it.
  2. Submit and approve the publication.
  3. Visit the publication and click the about tab. Right click on the image that you added description to and select "Inspect" menu to verify that whether the alt attribute value of the img tag is the same as you entered in publication submission.
  4. Visit the publication through admin interface. In the Content section, click the Edit button and you will see the image description text field displays there. Change the description and save it, go back to insepect the image source code again to see if the alt attribute displays what you just updated to.

I tested the changes on dev PURR and it works as expected.

Jerry

@kuang5 kuang5 requested review from dbenham and nkissebe as code owners March 20, 2026 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant