w3c / microdata

Moved to https://html.spec.whatwg.org/multipage/microdata.html
15 stars 19 forks source link

Requiring both @itemscope and @itemtype when using @itemid seems unnecessary #57

Closed gkellogg closed 7 years ago

gkellogg commented 7 years ago

Note that Microdata to RDF makes no such restriction, and includes a process for crafting URIs for @itemprop values based on the document location. Either this restriction should be removed (requiring only @itemscope), or we’ll need to remove that mechanism from a future Microdata to RDF update. In the absence of either @itemid or @itemtype, a Microdata to RDF processor will generate triples using blank node identifiers. Either such a processor should not ever generate triples without seeing an @itemtype, or @itemid should be allowed without @itemtype.

chaals commented 7 years ago

For the following code:

<p itemscope itemid="http://example.org/ID">
 <span itemprop="name">test</span>
</p>

Structured Data Linter and Google's tool explicitly recognises the id, and Yandex' validator recognises the itemid property which is also what it shows if you have a typed item.

I think that means we have interoperability without the constraint of only working on typed items, so I propose to fix this issue by allowing itemid on any item.