Missing alt tag on Swap Images - by Royalty

This topic has 27 replies, 4 voices, and was last updated 8 years, 3 months ago ago by Jack Richardson

  • Avatar: Royalty
    Royalty
    Participant
    November 7, 2015 at 09:34

    Hello,
    I’ve noticed that the hover effect images (Swap) dont’t have alt tags, although I have given alt tags to every image in my media library. It seems that the theme ignores these and thats a problem if I want to share one of these hover images via Pinterest. Because if there is no alt tag, Pinterest grabs the Yoast Seo Title of the current post or if there is no Yoast Seo installed, it grabs the image title tag of the current post. but not the image title tag that was given to the shared image itself.
    I will give you some more details to check live this in Private Content.

    Could you please help me and tell me how to add the image alt tags to the Hover Images?
    Many thanks in advance!

    Please, contact administrator
    for this information.
    26 Answers
    Avatar: Eva
    Eva Kemp
    Support staff
    November 9, 2015 at 11:25

    Hello,

    We’ll fix this issue in the next theme update.

    Please take our apologies for inconveniences.

    Regards,
    Eva Kemp.

    Avatar: Royalty
    Royalty
    Participant
    November 9, 2015 at 12:35

    Ok, so it will definetly be fixed in the next update? Can you already estimate when the update will be out?
    Thank you.

    Avatar: Eva
    Eva Kemp
    Support staff
    November 11, 2015 at 10:38

    Hello,

    We’ll pass this issue to our developers and they will include the fix in the theme update.
    A new version should be released approximately in a week or earlier.

    Regards,
    Eva Kemp.

    Avatar: Royalty
    Royalty
    Participant
    November 12, 2015 at 14:30

    Ok great, looking forward for it. Thank you!

    Avatar: Eva
    Eva Kemp
    Support staff
    November 12, 2015 at 14:34

    Hello,

    You’re welcome.

    Regards,
    Eva Kemp.

    Avatar: jaarsmacommunicatie
    jaarsmacommunicatie
    Participant
    November 16, 2015 at 00:05

    Yes, I Found the same, Alt tags appear to be missing for all product images.

    Avatar: Eva
    Eva Kemp
    Support staff
    November 16, 2015 at 10:17

    Hello @jaarsmacommunicatie,

    This bug will be fixed in the next theme update.

    Please take our apologies.

    Regards,
    Eva Kemp.

    Avatar: Royalty
    Royalty
    Participant
    November 28, 2015 at 14:36

    Hello,
    as there hasnt been an update to fix this yet, I wanted to ask when it will be out?
    Thank you.

    Avatar: Eva
    Eva Kemp
    Support staff
    November 29, 2015 at 10:25

    Hello @Royalty,

    Our developers are working on the theme improvement and it should be released in short time.
    We appreciate your patience and understanding.

    Thank you.

    Regards,
    Eva Kemp.

    Avatar: Royalty
    Royalty
    Participant
    December 15, 2015 at 13:02

    Thank you for fixing this. But instead of the product title, I would like to show the image alt tag. How do I have to edit the code to achieve this?
    Many thanks in advance!

    Avatar: Eva
    Eva Kemp
    Support staff
    December 16, 2015 at 09:47

    Hello,

    You need edit the file wp-content/themes/royal/woocommerce/content-product.php in line 79 and change the code <img src="<?php echo $hoverImg['url']; ?>" alt="<?php the_title(); ?>" class="show-image"> to this one <img src="<?php echo $hoverImg['url']; ?>" alt="<?php alt_text(); ?>" class="show-image">

    Regards,
    Eva Kemp.

    Avatar: Royalty
    Royalty
    Participant
    December 16, 2015 at 17:11

    Thank you. But for my needs, I need to edit wp-content/themes/royal/woocommerce/content-product-slider.php on line 90 too. But when I insert the provided code, it breaks the layout. Any suggestions?
    Many thanks in advance!

    Avatar: Eva
    Eva Kemp
    Support staff
    December 17, 2015 at 14:04

    Hello @Royalty,

    Please provide us with FTP and wp-admin panel credentials in Private Content.

    Regards,
    Eva Kemp.

    Avatar: Royalty
    Royalty
    Participant
    December 19, 2015 at 23:46

    Isnt it possible to help me without giving out my credentials?
    I tried to replace <img src="<?php echo $hoverImg['url']; ?>" alt="<?php the_title(); ?>" class="show-image"> on line 90 of content-product-slider with <img src="<?php echo $hoverImg['url']; ?>" alt="<?php alt_text(); ?>" class="show-image"> but this breaks the layout. Any help how to edit the code would be really appreciated.
    Many thanks in advance.

    Avatar: Royalty
    Royalty
    Participant
    December 19, 2015 at 23:51

    Update: Dont know why but now it works. But its still showing the product title instead of the image alt tag. I’ve made the changes in content-product.php and in content-slider.php. Is there any part of the code that I have missed to edit?

    Avatar: Royalty
    Royalty
    Participant
    December 19, 2015 at 23:54

    Sorry, I wanted to edit my last post but it always says “You cannot reply to this topic.”. My last post was wrong. The provided code still breaks the layout in content-slider.php.

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    December 22, 2015 at 09:23

    Hello,

    Please provide us with FTP (FTP host, FTP user, FTP password) credentials in private content.

    Best regards,
    Jack Richardson.

    Avatar: Royalty
    Royalty
    Participant
    December 28, 2015 at 14:32

    Hello,
    please find temporary ftp credentials in private content. Please note that you have to make changes in themes/royalchildtheme/woocommerce because I have copied the edited woocommerce files into my childtheme folder.
    Many thanks in advance!

    Please, contact administrator
    for this information.
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    December 29, 2015 at 20:24

    Hello,

    Alternative text (alt tag) is only meant to be shown when the image cannot be displayed and title text is for tooltip. Set image title the same as alt text.

    Best regards,
    Jack Richardson.

  • 1 2
    Viewing 20 results - 1 through 20 (of 27 total)

The issue related to '‘Missing alt tag on Swap Images’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.