NPM Resource Changed PR-5.2-dev Pending

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
27 Jul 2024

Summary of Changes

Often does the filename describe the picture and it would be a good starting point for the alternative text when selecting an image for the description field. This pr prefills the alternative text input field with the filename without underscrore and file extension.

Testing Instructions

  • Open the article form
  • Click on "CMS Content"
  • Click on "Media"
  • Select an image

Actual result BEFORE applying this Pull Request

The "Image Description (Alt Text)" input field is empty.

Expected result AFTER applying this Pull Request

The "Image Description (Alt Text)" input field is has the filename prefilled without -_ characters and the file extension.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar laoneo laoneo - open - 27 Jul 2024
avatar laoneo laoneo - change - 27 Jul 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 27 Jul 2024
Category JavaScript Repository NPM Change
avatar ChristineWk ChristineWk - test_item - 27 Jul 2024 - Tested successfully
avatar ChristineWk
ChristineWk - comment - 27 Jul 2024

I have tested this item ✅ successfully on c0de826


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43855.

avatar brianteeman
brianteeman - comment - 27 Jul 2024

No. Absolutely not. This goes against everything we have done to encourage accessibility.

There is not much I am adamant that shouldn't be done but this is one.

avatar laoneo laoneo - change - 27 Jul 2024
Labels Added: NPM Resource Changed PR-5.2-dev
avatar joomla-cms-bot joomla-cms-bot - change - 27 Jul 2024
Category JavaScript Repository NPM Change Administration com_media NPM Change JavaScript Repository
avatar laoneo
laoneo - comment - 27 Jul 2024

Then explain why.

avatar brianteeman
brianteeman - comment - 27 Jul 2024

I am sad that we have done such a terrible job of explaining what the alt text description is for that any further discussion is merited. I am not at my computer until tonight but just Google what alt text is for and it really should be obvious.

It should be a conscious decision of the content creator to describe the image in the context that it is used.

avatar exlemor
exlemor - comment - 27 Jul 2024

I am not as expert as Brian or a couple of others in the Accessibility Team but I have to agree this is a constant issue around alt(ergative) text ( and also image description).

Here is a good alt(ernative text) for the image below:
"A stack of pancakes on a plate with banana, walnuts and honey"

vs what you could get from using the technique proposed above... especially knowing that most people name their images sadly DSC14906.jpg

so definitely not a fan of this proposition ;(

pancakes-300x200

avatar chmst
chmst - comment - 27 Jul 2024

This is completely wrong. The alt -text describes an image for blind users. The image name can NEVER be used as description. @exlemor gave an example.
For further reading: please see here https://www.w3.org/WAI/WCAG22/Techniques/failures/F30

avatar brianteeman
brianteeman - comment - 27 Jul 2024

This should be closed for the reasons stated above

avatar zeroalphagit
zeroalphagit - comment - 28 Jul 2024

@chmst is wrong

alt text is far more important: https://developers.google.com/search/docs/appearance/google-images

Google uses alt text along with computer vision algorithms and the contents of the page to understand the subject matter of the image. Also, alt text in images is useful as anchor text if you decide to use an image as a link.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43855.

avatar brianteeman
brianteeman - comment - 28 Jul 2024

@zeroalphagit thanks for providing even more reasons that you should never use the filename

avatar Hackwar Hackwar - change - 28 Jul 2024
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2024-07-28 11:45:37
Closed_By Hackwar
avatar Hackwar
Hackwar - comment - 28 Jul 2024

I'm closing this PR here. I don't want this to escalate. The arguments have been exchanged and the decision by me is to not include this into 5.2. I also don't see this as part of any other release, but if the decision is changed for some reason for a future version, this PR can be opened again.

avatar Hackwar Hackwar - close - 28 Jul 2024
avatar dgrammatiko
dgrammatiko - comment - 28 Jul 2024

@laoneo could you make a Pr with only adding the extra name parameter to the emitted event? Actually I would pass every info to the event. I have no clue why we restricted the api in the first place but more info means more options for devs…

avatar laoneo
laoneo - comment - 29 Jul 2024

If you add images with a name DSC14906, then there is another issue in the publishing process. What I often see is that people give images meaningful names, and then I don't see it as completely wrong to fill it as default for the alt text. As I said, having the image name as a starting point was the intention of the pr. I really hoped there would be a discussion here how to improve the current situation and not just tear it down. As I said, it doesn't just use the bare image name, it removes the special characters and extension.

avatar laoneo
laoneo - comment - 29 Jul 2024

@dgrammatiko can yo check #43859 if I didn't forget something.

avatar chmst
chmst - comment - 29 Jul 2024

What I often see is that people give images meaningful names, and then I don't see it as completely wrong to fill it as default for the alt text.

Sometimes there are menaingful names,
But I doubt that even meaningful names can describe the information of an image in a given context correctly.
If users see that the name is prefilled wirh anything, they could think " oh fine - Joomla is perfect and that's ok for accessibility".

But in most cases this is not helpful for a blind user. For example
"image 2024_holidays_starnberg-ramp.jpg". That's a meaningful name. For ablind user does not describe the information.
The information in the image is: "A long ramp enables entering the lake near Starnberg with a wheelchair".

What I would really like to see is this:
The user MUST select if an image is only decorative or informative.
If informative, he gets the text input field and this is mandatory.
But do't know how to implement this

avatar dgrammatiko
dgrammatiko - comment - 29 Jul 2024

For example "image 2024_holidays_starnberg-ramp.jpg".

Although everything that said about a11y and alt is correct, CONTEXT MATTERS. I guess what Allen had in mind was cases/workflows were you could benefit from particular filenames.
An example would be an e-commerce site were the product is a mobile phone and the images are the views of the product let's say
[top, left_side, right_side, front, back, bottom]_view_of_xxxx_model_yyy.jpg
Then with the current proposal the alt tags are automatically prefilled CORRECTLY!

Is this an edge case for a CMS?
I have no clue, for me the worst part is that people are dogmatic and the API is really very limited...

avatar chmst
chmst - comment - 29 Jul 2024

This is an edge case and I see what you mean. I think it would be better to use an override or a plugin for that.

avatar dgrammatiko
dgrammatiko - comment - 29 Jul 2024

I think it would be better to use an override or a plugin for that.

Probably but the API right now doesn't allow that, catch-22...

avatar brianteeman
brianteeman - comment - 29 Jul 2024

There are extensions already available on the JED that will generate fake alt text descriptions from the image filename

avatar dgrammatiko
dgrammatiko - comment - 29 Jul 2024

Pretty sure at this point there are even plugins that use AI to solve this problem way better.

avatar brianteeman
brianteeman - comment - 29 Jul 2024

Pretty sure at this point there are even plugins that use AI to solve this problem way better.

No, not really https://magazine.joomla.org/all-issues/june-2024/ai-generated-alt-text

avatar ChristineWk
ChristineWk - comment - 29 Jul 2024

Now I understand what Christiane means about the alt text for screen readers.
A few thoughts on this: I often get pictures from people via FB, WA, or or ...

I always rename these, e.g. instead of an endless number-letter disaster in the path: event-xyz-date.
But as I said: not useful for screen readers (blind people) Is there perhaps a description field (optional)? Example:
Christiane and Christine smile at Joomladay with their great hats.
I still have to read the latest comments. Thank you.

avatar brianteeman
brianteeman - comment - 29 Jul 2024

perhaps there could be a way to have a "suggestion button. When pressed it would input the sanitized filename into the alt description field or at a later date be enhanced to use AI. At least then it would be a conscious decision by the content author what text to use etc

Add a Comment

Login with GitHub to post a comment