We are using RDFa format to display the breadcrumb using the examples provided by BreadcrumbList. When we insert the following example into Google's Structured Data Testing Tool, we get the following errors.
Setup:
- Display all
items in theBreadcrumbList. - Last
itemin the breadcrumb is displayed in plain text.
What is the correct format for the last item when using RDFa format?
Sample code
<ol vocab="http://schema.org/" typeof="BreadcrumbList">
<li property="itemListElement" typeof="ListItem">
<a property="item" typeof="WebPage" href="https://example.com/dresses">
<span property="name">Dresses</span></a>
<meta property="position" content="1">
</li>
<li property="itemListElement" typeof="ListItem">
<a property="item" typeof="WebPage" href="https://example.com/foo-bar">
<span property="name">foo-bar</span></a>
<meta property="position" content="2">
</li>
<li property="itemListElement" typeof="ListItem">
<span property="name">Real Dresses</span>
<meta property="position" content="3">
</li>
</ol>
Error Message for the last item using code from above:
A value for the item field is required.
What we tried but did not validate
<ol vocab="http://schema.org/" typeof="BreadcrumbList">
<li property="itemListElement" typeof="ListItem">
<a property="item" typeof="WebPage" href="https://example.com/dresses">
<span property="name">Dresses</span></a>
<meta property="position" content="1">
</li>
<li property="itemListElement" typeof="ListItem">
<a property="item" typeof="WebPage" href="https://example.com/foo-bar">
<span property="name">foo-bar</span></a>
<meta property="position" content="2">
</li>
<li property="itemListElement" typeof="ListItem">
<div property="item">
<span property="name">Real Dresses</span>
</div>
<meta property="position" content="3">
</li>
</ol>
Error Message when using <div property="item"> from above:
The value provided for item.id must be a valid URL.
The last item (for the current page) still represents a web page, even if you don’t want to show a hyperlink.
So, simply add
typeof="WebPage"to thedivof the last item:You could still provide the last item’s URI (without showing it) by using the
resourceattribute:This results in: