civictheme / uikit

UI atomic component-based library with Storybook integration
https://uikit.civictheme.io/
GNU General Public License v2.0
5 stars 4 forks source link

Image alt text does not allow for decorative text. #320

Open SteveM-aus opened 1 month ago

SteveM-aus commented 1 month ago

Summary

There is no capacity to code images up as decorative.

We need the ability for the alt text field on the media library to be:

note the alt text should be contextual in relation to the message/content it is associated with!

This is required to ensure compliance with WCAG 2.2 1.1.1

Steps to reproduce

Go to Content | Media Select image to be edited (add media to upload new image) The alt text field is mandatory requiring text - it does not allow for no entry and placing "" inside the field to replicate decorative alt text results in """" in the code.

Note: there is no option when inserting the image into a web page to change or update the alt text, which is also required to ensure it is contextual (aligns with the messaging of the page)

Observed outcome

alt text is returning """" in code which does not allow for assisted technology browsers to interpret correctly as decorative (ignoring the image). Some assisted technology browsers seems to be interpreting this as bad coding and trying to use AI to describe the image by stating appears to be .......

Often the generic alt text provided in the media library is not suitable for the image's use on the web page, it could be focused on the incorrect messaging, to descriptive, not descriptive enough.

Expected outcome

The alt text should provide assisted technology users the same experience to consume information as a visual person. This includes not having to hear of an image that is only presented on the page as decorative (visual users will normally skip straight over this) or not unnecessarily repeating information already presented in the content (particularly immediately prior or afterwards)

AlexSkrypnyk commented 1 month ago

@fionamorrison23 Please transfer this to D.O. and close this issue

@SteveM-aus please submit Drupal-related issue to https://www.drupal.org/project/issues/civictheme

Thank you