Image tooltips showing html from image titles
Starting last week there has been an issue with how tooltips are displayed. Tooltips are now displaying html code embedded in an image title. Previously only the anchor text was shown. This applies to the tooltips that appear when hovering the mouse pointer over thumbnails in an image gallery as well the previous image link, next image link and the image itself on an attachment page. This issue occurs for new posts and for all previous posts as well. Please revert it to the previous behavior, or use the alt attribute instead, or don’t show tooltips at all.
My blog is smallhousebliss.com.
The blog I need help with is smallhousebliss.com.
Any suggestions would be appreciated, thanks!
Ryan talks about the “alt-caption-title fallback”, the meaning of which is described in the last message of the referenced ticket as ” In the add media modal, fallback back to caption if alt is not set. Falback to title if neither caption nor alt are set.”
Using ALT would be fine, and that is one of the three options I suggested to fix the problem. But that is NOT what is happening. I have the ALT attribute set but the TITLE attribute is being used anyway.
I have the ALT attribute set but the TITLE attribute is being used anyway.
I tagged this thread for Staff intervention. If you subscribe to the thread you will be notified when they respond.
smallhousebliss – it would be very helpful if you could provide a couple of links to specific posts where you’re seeing HTML code displayed on your images’ tooltips so I investigate. Thanks!
Thanks Kathryn. They seem to be on all galleries and image attachment pages. This is a typical post page with tooltips on the image gallery:
And an image attachment page with tooltips on the image and the previous and next image links:
Thanks a lot for these, they’re very helpful.
The reason that code is showing up is that it’s been added in the image title field.
You can see that on this image in the Media Library, for example:
And here’s a screenshot:
If you remove the code from that field it should go away in the tooltips. Let me know if you need further help.
Yes, I know it’s in the title field. But only the anchor text is displayed as the title on the image attachment page, and before last week only the anchor text was shown in the tooltips. Something has changed to cause the underlying hyperlink code to be displayed.
The entire media system was overhauled so that would likely account for the change. I will let our developers know about this side effect to see if it’s something they might look at changing in a future update.
Just to clarify something, have you always been adding that HTML manually in the Title field when you upload images?
Yes, we have manually included a link back to the relevant post page in almost every image title.
There have been comments on other threads, such as https://en.forums.wordpress.com/topic/new-media-upgrade-has-major-flaws-wordpress-support-please?replies=26#post-1081764, that the ALT attribute should be used for the tooltip if it is present. We have been including ALT text as well, so wonder why that isn’t being used?
The field in which you’re adding the HTML here:
… is not the same field that is being referred to in the post you referenced just above. The field mentioned in the post is the “tootip” title attribute. That’s not what you’re adding in the field in the screenshot – that field is not the tooltip field.
If you’re looking for the tooltip field, you can now find it only on the Advanced Image settings popup. You can access that screen by clicking on an image in a post or gallery, and then clicking the small icon to bring up the advanced editing window. There, you can add a tooltip title. In the screenshot here, the tooltip title would be “Leftovers”:
Let me know if this helps clear up the confusion.
Knowing that there are two title fields helps a bit, but shouldn’t ALT still take precedence? Ticket http://core.trac.wordpress.org/ticket/18984 is described as “Title attribute should not be added to image markup by media.php”. That has been done for images in posts but not for gallery thumbnails or image attachment pages.
shouldn’t ALT still take precedence?
Not in this case, since the field into which you’re adding the HTML now is not the attribute which is related in any way to the ALT tag.
The topic ‘Image tooltips showing html from image titles’ is closed to new replies.