Why is my http://schema.org/BreadcrumbList not validating?
Asked Answered
M

1

2

I'm using schema.org microdata on my web site but I'm struggling with the BreadcrumbList as Google's structured data testing tool will not validate it. It looks correct and I can't see what's wrong.

You can click the above link to see the errors, but to summarise, Google says that the itemtype attribute has an invalid value for each of the items and also complains that the mainEntityOfPage attribute is missing from the list. I did try adding mainEntityOfPage in a meta tag but it still complained about it.

What am I doing wrong?

<ul itemscope="" itemtype="http://schema.org/BreadcrumbList">
    <li class="home" itemscope="" itemprop="itemListElement" itemtype="http://schema.org/ListItem">
        <a href="http://www.rossmod.co.uk/" title="Go to Home Page" itemprop="item"><span itemprop="name">Home</span></a>
        <span>/ </span>
        <meta itemprop="position" content="1">
    </li>
    <li class="category3" itemscope="" itemprop="itemListElement" itemtype="http://schema.org/ListItem">
        <a href="http://www.rossmod.co.uk/rc-cars.html" title="" itemprop="item"><span itemprop="name">RC Cars</span></a>
        <span>/ </span>
        <meta itemprop="position" content="2">
    </li>
    <li class="category10" itemscope="" itemprop="itemListElement" itemtype="http://schema.org/ListItem">
        <a href="http://www.rossmod.co.uk/rc-cars/car-kits.html" title="" itemprop="item"><span itemprop="name">Car Kits</span></a>
        <span>/ </span>
        <meta itemprop="position" content="3">
    </li>
    <li class="product">
        <strong>Tamiya Lunch Box. No ESC [58347]</strong>
    </li>
</ul>
Machzor answered 27/8, 2015 at 12:53 Comment(2)
Same problem when using JSON-LDPredatory
There was an issue with the validation happening on Google's side. Using the original snippet, the tool now indicates it is valid. I would also suggest using <ol> instead of <ul> for semantic reason. After all, the list is ordered.Barytes
S
3

The breadcrumbs must use the breadcrumb property, and put this inside another itemscope (ideally http://schema.org/WebPage). You are also missing is itemprop="breadcrumb which must be right before your itemscope.

<div class="breadcrumbs" itemscope itemtype="http://schema.org/WebPage"> 
<ul itemprop="breadcrumb" itemscope="" itemtype="http://schema.org/BreadcrumbList">
<li class="home" itemscope="" itemprop="itemListElement" itemtype="http://schema.org/ListItem">
    <a href="http://www.rossmod.co.uk/" title="Go to Home Page" itemprop="item"><span itemprop="name">Home</span></a>
    <span>/ </span>
    <meta itemprop="position" content="1">
</li>
<li class="category3" itemscope="" itemprop="itemListElement" itemtype="http://schema.org/ListItem">
    <a href="http://www.rossmod.co.uk/rc-cars.html" title="" itemprop="item"><span itemprop="name">RC Cars</span></a>
    <span>/ </span>
    <meta itemprop="position" content="2">
</li>
<li class="category10" itemscope="" itemprop="itemListElement" itemtype="http://schema.org/ListItem">
    <a href="http://www.rossmod.co.uk/rc-cars/car-kits.html" title="" itemprop="item"><span itemprop="name">Car Kits</span></a>
    <span>/ </span>
    <meta itemprop="position" content="3">
</li>
<li class="product">
    <strong>Tamiya Lunch Box. No ESC [58347]</strong>
</li>
</ul>
Schuyler answered 29/8, 2015 at 0:41 Comment(2)
Today Google seems to be validating the rich data without any changes to the source (although Bing doesn't), however I believe you're correct in that itemprop="breadcrumb" was missing so I've added that.Machzor
Using breadcrumb inside an itemscope is recommended, but not a must. As also stated on schema.org/WebPage: "Every web page is implicitly assumed to be declared to be of type WebPage, "Barbell

© 2022 - 2024 — McMap. All rights reserved.