microdata

Microdata specification mandates value for 'itemscope' attribute?


I've been filling my website with Microdata (using recommended metadata / schema.org) for rich search results in search engines.

After finishing things up and testing with Google Rich Snippet Tool everything looks ok but now when I access my website with an Android browser I get the following message:

Specification mandate value for attribute itemscope

This looks like an error related with itemscope attribute being defined without a value, but that is how Microdata defines its standard.

Does anyone knows how to fix this issue? Microdata defines the itemscope attribute without value (interesting stuff as it produces invalid XML and it’s being defined by Web giants).


Solution

  • HTML5 is not XML. Boolean attributes do not need an explicit value. See the spec here for examples.

    http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#boolean-attributes

    If there is a browser that does not handle this style of attribute, you ought to feel free to use the empty string form. Do not worry that the Microdata specification uses a different form, since they mean the same thing.