Schema.org microdata - navigation nested ItemList (Google validation error)

1k views Asked by At

Everybody knows about microdata, but nobody knows how and when to use it properly. After searching through different StackOverflow questions and Google results I came up with following structure.

<nav itemscope itemtype="http://schema.org/SiteNavigationElement">
  <ul itemscope itemtype="http://schema.org/ItemList">
    <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
      <meta itemprop="position" content="1">
      <a href="http://example.com/page1" itemprop="url">
        <span itemprop="name">Page 1</span>
      </a>
    </li>
    <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
       <meta itemprop="position" content="2">
       <a href="http://example.com/page2" itemprop="url">
         <span itemprop="name">Page 2</span>
       </a>
       <ul itemscope itemtype="http://schema.org/ItemList">
         <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
           <meta itemprop="position" content="1">
           <a href="http://example.com/page2-1" itemprop="url">
             <span itemprop="name">Page 2-1</span>
           </a>
         </li>
         <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
           <meta itemprop="position" content="2">
           <a href="http://example.com/page2-2" itemprop="url">
             <span itemprop="name">Page 2-2</span>
           </a>
         </li>
       </ul>
     </li>
   </ul>
 </nav>

The only problem that I have is that I'm getting "Multiple ItemList markups on a page are not allowed" error from Google Testing Tool: https://search.google.com/structured-data/testing-tool

Every other schema.org validator is fine with this. Is there mistake in my code or in Google Tool?

Update: it seems that Google just doesn't like that there is several item-list on the page. That's definetely against schema.org standarts. If I place this code two times I get the same error.

<ul itemscope itemtype="http://schema.org/ItemList">
  <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
    <meta itemprop="position" content="1">
    <a title="Page 1" href="http://example.com/page1" itemprop="url">
      <span itemprop="name">Page 1</span>
    </a>
  </li>
</ul>
1

There are 1 answers

0
unor On

The Google Structured Data Testing Tool isn’t a general Schema.org checker. Most of the warnings/errors are about rich results in Google Search.

For example, the Carousels rich result makes use of ItemList, so the error could mean that your page doesn’t qualify for getting this rich result in Google’s search results. If you don’t want to (or can’t) get this rich result, you can ignore the error.

Schema.org doesn’t restrict how often a type can be used in a document.