WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. adopted3
    Member
    Posted 11 months 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?

    Thanks,
    Paul

    http://wordpress.org/plugins/ecwid-useful-tools/

  2. seyfin
    Member
    Plugin Author

    Posted 11 months 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:

    wp-content/plugins/ecwid-useful-tools/classes/Display.php

    - 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
    Member
    Posted 11 months ago #

    Thank you very much! :)

  4. seyfin
    Member
    Plugin Author

    Posted 11 months ago #

    I was glad to help you.

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

Reply

You must log in to post.

About this Plugin

About this Topic