Search code examples
htmlschema.orgstructured-data

The property height is not recognized by Google for an object of type Distance


Given a visual art work that's 18 x 24 inches:

<div itemscope="itemscope" itemtype="http://schema.org/VisualArtwork">
  <span itemprop="height" itemscope="itemscope" 
    itemtype="http://schema.org/Distance">18 inches</span>
  <span itemprop="width" itemscope="itemscope" 
    itemtype="http://schema.org/Distance">24 inches</span>
</div>

This markup fails the Structured Data Testing Tool with the error, "The property height is not recognized by Google for an object of type Distance." Same goes for width.

Interestingly enough, if you plug the first example from Schema.org for VisualArtwork (the one about the Magritte painting) into the SDTT you get the same errors. Is the Testing Tool mistaken about this?


Solution

  • I would suggest using [Quantitative Value] instead of [Distance]. Here's a basic example:

    <div itemscope="itemscope" itemtype="http://schema.org/VisualArtwork">
      <span itemprop="height" itemscope="itemscope" itemtype="http://schema.org/QuantitativeValue">
        <span itemprop="value">18</span> 
        <span itemprop="unitCode" content="INH">inches</span>
      </span>
      <span itemprop="width" itemscope="itemscope" itemtype="http://schema.org/QuantitativeValue">
        <span itemprop="value">24</span> 
        <span itemprop="unitCode" content="INH">inches</span>
      </span>
    </div>
    

    I've given some additional information about this in my blog post at http://www.lazaruscorporation.co.uk/blogs/arts-tech/posts/schema-dot-org-quantitative-value-accessibility-typography

    I'll have a look at the examples on schema.org and correct them if necessary (I was the person who wrote those examples!)

    Paul