Google now supporting new version of Schema.org BreadcrumbList?
Asked Answered
E

1

1

It appears as though Google has now implemented Schema.org version 2 and Google's own examples fail Google's validation test. For example, here's is Google's example JSON-LD code for breadcrumbs:

<script type="application/ld+json">
{
    "@context": "http://schema.org",
    "@type": "BreadcrumbList",
    "itemListElement": [
        {
            "@type": "ListItem",
            "position": 1,
            "item": {
                "@id": "https://example.com/arts",
                "name": "Arts"
            }
        },
        {
            "@type": "ListItem",
            "position": 2,
            "item": {
                "@id": "https://example.com/arts/books",
                "name": "Books"
            }
        },
        {
            "@type": "ListItem",
            "position": 3,
            "item": {
                "@id": "https://example.com/arts/books/poetry",
                "name": "Poetry"
            }
        }
    ]
}
</script>

Yesterday, when I pasted the above code into a test.html file, Google's validation tool validated it as a "Pass".

Today, it fails. It appears that you now have to explicitly define a mainEntity. But they haven't bothered to update their docs.

Does anyone know where to find the official documentation on using JSON-LD? Schema.org doesn't offer much and appears to also be out-dated. I managed to get the following code to pass the test:

<script type="application/ld+json">
{
    "@context": "http://schema.org",
    "@type": "WebPage",
    "mainEntity": {
        "@context": "http://schema.org",
        "@type": "BreadcrumbList",
        "itemListElement": [
            {
                "@type": "ListItem",
                "position": 1,
                "item": {
                    "@id": "http://www.example.com",
                    "name": "Home"
                }
            },
            {
                "@type": "ListItem",
                "position": 2,
                "item": {
                    "@id": "http://www.example.com/shop.com",
                    "name": "Shop"
                }
            }
        ]
    }
}
</script>

What I'm worried about this is:

Let's say you also define a product on the same page, using microdata, will the search engines treat the breadcrumb list as the mainEntity? i.e. Will it rank higher in search results, than the product will?

Estabrook answered 28/8, 2015 at 15:14 Comment(3)
Do you really mean "Microdata" in your last question? So you want to use JSON-LD for the BreadcrumbList and Microdata for the Product?Buote
Same problem when using MicrodataBuote
The other way around according to google. Here's an excerpt from google's recommendations : Google is in the process of adding JSON-LD support to more markup-powered features. So far, JSON-LD is supported for all Knowledge Graph features, sitelink search boxes, Event Rich Snippets, and Recipe Rich Snippets; Google recommends the use of JSON-LD for those features. For the remaining Rich Snippets types and breadcrumbs, Google recommends the use of microdata or RDFa. developers.google.com/structured-data/schema-orgEstabrook
B
2

You have to separate concerns:

  • Schema.org is a vocabulary.
  • JSON-LD is a syntax.
  • Google is a consumer that supports structured data that

    • is provided in the JSON-LD syntax and
    • makes use of the Schema.org vocabulary.

Schema.org can’t be "out-dated": they are of course the canonical source of their own types/properties. If some of their types/properties get deprecated, they typically keep being part of the vocabulary.

The "official documentation on using JSON-LD" is the W3C Recommendation (linked above).

If I understand your issue correctly, your problem is with Google: their documentation vs. their testing tool. They document that they support Schema.org’s BreadcrumbList type, but their testing tool doesn’t recognize this type:

The attribute itemtype has an invalid value.

(Although this error message refers to "itemtype", which is a Microdata attribute, it comes up no matter which supported syntax you test.)

There is nothing you can do about it. The first snippet is valid JSON-LD and it’s an appropriate use of the Schema.org vocabulary. The fact that Google even documents it that way makes it seem likely that their testing tool is bugged currently (which happened several times before).

About your second snippet: using mainEntity that way is probably not what you want to convey. You are saying that the breadcrumbs would be the main entity of the web page, but that would be very uncommon. Typically the main entity is an Article etc.

Buote answered 28/8, 2015 at 17:37 Comment(2)
Yes, exactly. I suspect google has just updated their support of the technology, because their sample worked just 2 days ago. Now their sample, as is, it doesn't work. I can get it working if I add the "mainEntity" which is apparently a requirement in Version 2.0 (in version 1.0 it was optional). So I suspect google updated support from Version 1 to Version 2, today. Looking for confirmation.Estabrook
@user1749141: Schema.org never requires any properties. Google, as one of many consumers, can of course require whatever it wants (they simply say: if you don’t provide this property, we don’t show a Rich Snippet), but it would seem very, very unlikely that they would ever require using mainEntity that way (because it would be wrong and make no sense). They might require using mainEntity if BreadcrumbList gets used (but it’s not documented currently), but that does not mean that the BreadcrumbList would have to be the main entity: the mainEntity would typically be its last entry.Buote

© 2022 - 2024 — McMap. All rights reserved.