plone / volto

React-based frontend for the Plone Content Management System
https://demo.plone.org/
MIT License
450 stars 611 forks source link

Image gallery listing variation has empty alt attributes #6302

Open jackahl opened 3 hours ago

jackahl commented 3 hours ago

Image gallery listing variation has empty alt attributes. I think one could argue that they are not necessarily of decorative nature and should therefore have decent alt tags.

As you cannot edit the contents within the slideshow, the source for the alt-text should come from the source object itself. I see two ways to do this:

  1. use the image objects description field --> might not be clear to editors, that this is used as alt text
  2. add a new "alt text" field to image content type --> in cmf plone or plone.volto?
davisagli commented 3 hours ago

Don't abuse the description for this. In many cases the description is shown as a caption, which is not the same purpose as alt text. The caption is text which is shown (or read) to all users and explains what the image is. The alt text is only shown (read) to users who can't see the image visually, and it adds any additional description that is needed for someone who can't see the image visually to understand it.

As long as the caption is always shown along with the image, the alt text can be empty in some cases when the caption already provides all necessary description. Repeating the same description in the alt text would be a worse UX for users with screen readers.

I would support adding alt text as a field on the Image content type. It'll also need to be a catalog metadata column in order to be included in the summary serialization for listings.

jackahl commented 3 hours ago

@davisagli In volto core we do not sure any image caption at all in the image gallery. We do have it in vlt though. We could also go ahead and add the image caption in core. I added an issue at plone.app.contentypes here: https://github.com/plone/plone.app.contenttypes/issues/700