Mobile app version of vmapp.org
Login or Join
Sarah324

: Element’s value is not recognized in structured data According to the Microdata specification, If the <meter> element has the [value] attribute and it is an itemprop, then the itemprop

@Sarah324

Posted in: #Microdata #StructuredData

According to the Microdata specification,

If the <meter> element has the [value] attribute and it is an itemprop, then the itemprop value should be the value of that [value] attribute.

<div itemscope="" itemtype="http://schema.org/Rating">
<meta itemprop="worstRating" content="0">
<meta itemprop="bestRating" content="1">
<meter min="0" max="1" value="0.4" itemprop="ratingValue">Poor</meter>
</div>


The value of ratingValue should be 0.4, however, it is incorrectly displayed as Poor, which is the textContent of the element.

Test it in Google’s Structured Data Testing Tool. The same result is obtained with Yandex’s Structured Data Validator.



How do I get the machine to recognize the [value] attribute as the correct value?

By the way, any additional info on where I can submit bugs for these tools would be appreciated.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Sarah324

1 Comments

Sorted by latest first Latest Oldest Best

 

@Shanna517

Indeed, this seems to be a bug in their tools.

Two workarounds




Add a content attribute with the value (valid according to W3C’s current Working Draft of Microdata):

<meter min="0" max="1" value="0.4" content="0.4" itemprop="ratingValue">Poor</meter>

Move the itemprop to a meta element (valid according to all Microdata specs):

<meter min="0" max="1" value="0.4">Poor</meter>
<meta itemprop="ratingValue" content="0.4">

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme