• Hi Lester,

    We’ve received a warning from our SEO software displaying that there are more than 6k images without alt attribute. Checking further we noticed that almost all of them refer to wp-content/plugins/wp-postratings/images/loading.gif.

    Is it possible to add an alt attribute to them?

    Thanks

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Lester Chan

    (@gamerz)

    It is removed because Google is indexing the word loading instead. If you want to add it back, do the following:

    Use the dev version https://github.com/lesterchan/wp-postratings/archive/master.zip
    Add this to your theme functions.php

    function wp_postratings_loading_alt() {
    return 'Loading ...';
    }
    add_filter( 'wp_postratings_loading_alt', 'wp_postratings_loading_alt' );

    To make this accessible, you should include an alt tag, but if it is decorative you can leave the tag empty (accessibility requires there to be an alt tag, regardless of whether its empty). In this way you avoid the Google indexing also. So I propose:

    function wp_postratings_loading_alt() {
    return '';
    }
    add_filter( 'wp_postratings_loading_alt', 'wp_postratings_loading_alt' );
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘loading.gif without alt attribute’ is closed to new replies.