This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 15975 - Incorrectly identified microdata as invalid
Summary: Incorrectly identified microdata as invalid
Status: RESOLVED WORKSFORME
Alias: None
Product: HTML Checker
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Michael[tm] Smith
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-13 17:13 UTC by Jonathan Worent
Modified: 2012-03-20 04:46 UTC (History)
1 user (show)

See Also:


Attachments

Description Jonathan Worent 2012-02-13 17:13:06 UTC
The spec at WHAT WG relating to microdata allows 'idemprop' attribute on <img> and <a>: http://www.whatwg.org/specs/web-apps/current-work/multipage/microdata.html#microdata

Specifically: 
"When a string value is a URLs, it is expressed using the a element and its href attribute, the img element and its src attribute, or other elements that link to or embed external resources.

In this example, the item has one property, "image", whose value is a URL:

<div itemscope>
 <img itemprop="image" src="google-logo.png" alt="Google">
</div>"


Several of the microformat specifications/implementations at schema.org recommend this. 


However, running the code example at http://www.schema.org/Person throws an incorrect error.



<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
    <div itemscope itemtype="http://schema.org/Person">
      <span itemprop="name">Jane Doe</span>
      <img src="janedoe.jpg" itemprop="image" />

      <span itemprop="jobTitle">Professor</span>
      <div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
        <span itemprop="streetAddress">
          20341 Whitworth Institute
          405 N. Whitworth
        </span>
        <span itemprop="addressLocality">Seattle</span>,
        <span itemprop="addressRegion">WA</span>
        <span itemprop="postalCode">98052</span>
      </div>
      <span itemprop="telephone">(425) 123-4567</span>
      <a href="mailto:jane-doe@xyz.edu" itemprop="email">
        jane-doe@xyz.edu</a>

      Jane's home page:
      <a href="www.janedoe.com" itemprop="url">janedoe.com</a>

      Graduate students:
      <a href="www.xyz.edu/students/alicejones.html" itemprop="colleagues">
        Alice Jones</a>
      <a href="www.xyz.edu/students/bobsmith.html" itemprop="colleagues">
        Bob Smith</a>
    </div>
</body>
</html>



I'm not 100% certain if this is an issue with the validator or the spec.
Comment 1 Michael[tm] Smith 2012-03-20 04:46:42 UTC
This microdata part of this validates now (though to get it to validate you'd need to also add an alt to that img).