ALT-text not updating?

Enonic version: 6.1.1
OS: OSX Yosemite

It seems to me like the title of an image is used as the alt text of images inserted in an HTML-area.

I have a content type, article, which uses the HTMLArea input field. I upload an image and insert it to the html area, and then I publish the article and the image. The value of the HTMLArea is rendered with portal.processHtml({_value: body}).

When I then update the title and slug of the uploaded image, and publish it, the alt text is not updated in the article, until I republish the article.

I am not sure whether this is by design; thus I report it as a bug. :slight_smile:

I think the alt/title is added when you add the image directly into the text, as a copy not a permanent binding. But agreed, that would’ve been pretty nice if it was bound so you could update image description/text/data like that.

@tsi What’s your comments?

Helge, I guess the current solution simply stores the alt-text inline and does not extract data from the image on rendering. However, I guess we should give users more control over the alt area than just displaying the title?

What do you propose?

I agree, more control would be appreciated! :smile:

I think editing of alt text should be a part of the image upload workflow. I would like to easily be able to edit a default alt text immediately after I have uploaded a new image. Furthermore, I would like to enter a unique alt text each time I use a particular image.

This is the current situation:

When I click the “Insert/edit image” of the HtmlArea, I am allowed to upload an image. After having done so, the image is previewed. I can press “Insert” to insert it to the HtmlArea. Currently, the alt text === file name, e.g. “my-image.jpg”.

If I want to edit the alt text, I have to do the following:

  1. Close the article
  2. Find the image content in the content tree
  3. Open it, edit the title, then save/republish the image.
  4. Close the image content.
  5. Reopen my article, remove the previously inserted image and reinsert it

I find this pretty cumbersome - and I will not be surprised if editors won’t do it. Consequently, we’ll get lots of weird alt texts…

1 Like

Yeah. The alt text should be set when the image is used, and any subsequent changes should be made where it is used.

When the image is first inserted, the image title may be the default, but if the image title is later changed, that should not affect the alt text where the image is used.

Why would you close the article? It’s in a tab?

True. Still, the process it somewhat cumbersome…