Image tooltips showing html from image titles

  • Author
    Posts
  • #1087164

    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.

    Thanks.

    The blog I need help with is smallhousebliss.com.

    #1087412

    Any suggestions would be appreciated, thanks!

    #1087413

    timethief
    Member
    #1087419

    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.

    #1087420

    timethief
    Member

    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.

    #1087421

    Thanks!

    #1087422

    timethief
    Member

    You’re welcome.

    #1087446

    kathrynwp
    Staff

    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!

    #1087447

    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:

    http://smallhousebliss.com/2012/12/01/small-cabin-on-vardehaugen-by-fantastic-norway/

    And an image attachment page with tooltips on the image and the previous and next image links:

    http://smallhousebliss.com/2012/12/01/small-cabin-on-vardehaugen-by-fantastic-norway/fantastic-norway-cabin-vardehaugen-exterior6-via-smallhousebliss/

    #1087448

    kathrynwp
    Staff

    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:

    https://smallhousebliss.wordpress.com/wp-admin/post.php?post=3672&action=edit

    And here’s a screenshot:

    http://cl.ly/image/2I3X3j1W3n44

    If you remove the code from that field it should go away in the tooltips. Let me know if you need further help.

    #1087459

    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.

    #1087464

    kathrynwp
    Staff

    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.

    #1087465

    kathrynwp
    Staff

    Just to clarify something, have you always been adding that HTML manually in the Title field when you upload images?

    #1087466

    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?

    #1087468

    kathrynwp
    Staff

    The field in which you’re adding the HTML here:

    http://cl.ly/image/2I3X3j1W3n44

    … 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”:

    http://en.support.wordpress.com/images/image-settings/#within-posts

    Let me know if this helps clear up the confusion.

    #1087470

    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.

    #1087472

    kathrynwp
    Staff

    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.