Product Advisor for Ecwid
[resolved] ecwid_random_products doesn't specify the required "alt" attribute (4 posts)

  1. adopted3
    Posted 2 years ago #

    When you run the W3C Markup Validation Service on a page that has Ecwid Random Products, you get one error per product thumbnail:

    Line 404, Column 623: required attribute "alt" not specified

    img requires the alt attribute.

    Could you please add that attribute?



  2. seyfin
    Plugin Author

    Posted 2 years ago #

    Thank you for your report.

    We will fix the issue in the next plugin release.

    Meantime, to fix the issue on your web-site, please adjust the code of the plugin as follows:

    - modify the following file in your WordPress installation:


    - find this line of code:

    $return .= '<img src="' . $product->getThumbnailUrl() . '" title="' . $product->getName() . '" class="ecwid-random-thumbnail" style="margin: 0" />';

    - and change it to:

    $return .= '<img src="' . $product->getThumbnailUrl() . '" title="' . $product->getName() . '" alt="' . $product->getName() . '" class="ecwid-random-thumbnail" style="margin: 0" />';

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

  3. adopted3
    Posted 2 years ago #

    Thank you very much! :)

  4. seyfin
    Plugin Author

    Posted 2 years ago #

    I was glad to help you.

    Should you have any questions regarding the plugin do not hesitate to ask.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Product Advisor for Ecwid
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic