• Resolved wizy80

    (@wizy80)


    How to remove “aria-label=”Rated 5 out of 5 stars” from tag DIV of star icons?

    Google reports them as improper use and therefore they should be removed.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Gemini Labs

    (@geminilabs)

    I’m not sure why Google reports it as improper since it does exactly the same thing on their reviews. Maybe it has something to do with the role="img" attribute?

    Google: rating summary stars
    Google: individual review stars
    Site Reviews: rating summary stars
    Site Reviews: individual review stars
    Thread Starter wizy80

    (@wizy80)

    I don’t know what to tell you, but Google’s PageSpeed ??actually reports that it is being used improperly and also reports it as serious.
    In the end I modified the StarRating.php file by removing line 22 “‘aria-label’ => $this->label(),” and so I solved the problem and now Google PageSpeed ??no longer gives me serious errors.

    If I were you I would investigate better why it reports it as an error.

    Plugin Author Gemini Labs

    (@geminilabs)

    Instead of removing it, can you try adding 'role' => 'img', to the array instead and see if that fixes the PageSpeed issue?

    Thread Starter wizy80

    (@wizy80)

    ??

    Plugin Author Gemini Labs

    (@geminilabs)

    Like this:

    Which will add the role attribute to the star ratings:

    Does that code change fix the issue with PageSpeed for you (if using a caching plugin, make sure to flush the cache after making the code change!)?

    • This reply was modified 4 months, 2 weeks ago by Gemini Labs.
    Thread Starter wizy80

    (@wizy80)

    ok that’s fine, adding ‘role’ => ‘img’, no longer gives an error. So ‘role’ => ‘img’ was missing,

    Add it to the next plugin update.

    Plugin Author Gemini Labs

    (@geminilabs)

    Thanks for testing. This will be fixed in the next update.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.