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 14596 - Microdata: validity contraints to catch missing attributes
Summary: Microdata: validity contraints to catch missing attributes
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-29 21:12 UTC by contributor
Modified: 2012-07-18 18:48 UTC (History)
4 users (show)

See Also:


Attachments

Description contributor 2011-10-29 21:12:29 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/microdata.html
Multipage: http://www.whatwg.org/C#names:-the-itemprop-attribute
Complete: http://www.whatwg.org/c#names:-the-itemprop-attribute

Comment:
Microdata: validity contraints to catch missing attributes

Posted from: 81.234.240.242
User agent: Opera/9.80 (X11; Linux x86_64; U; Edition Next; en) Presto/2.9.220 Version/12.00
Comment 1 Philip Jägenstedt 2011-10-29 21:16:23 UTC
To help catch authoring errors like the one in bug 14595, we could improve the validity constraints related to itemprop a bit. Specifically, if itemprop appears of any of the following attributes, require that the attribute is present:

meta: content
audio, embed, iframe, img, source, track, or video: src
a, area, or link: href
object: data
data: value

(Matching how itemValue works.)

If one deliberately wants an empty value, one can simply use e.g. <data itemprop="prop" value=""> instead of <data itemprop="prop">.
Comment 2 Philip Jägenstedt 2011-10-30 08:23:27 UTC
Sorry, it was late when I filed this bug, value="" is already required for <data>. Here's a pruned list of things that currently doesn't give a warning in validtor.nu but should, under the assumption that it's the spec's fault:

<audio itemprop=x><source src=a></audio>
<embed itemprop=x>
<iframe itemprop=x></iframe>
<video itemprop=x><source src=a></video>
<a itemprop=x></a>
<map name=n><area itemprop=x></map>
<object itemprop=x type=text/plain></object>
Comment 3 Ian 'Hixie' Hickson 2011-10-30 16:18:28 UTC
cc'ing hsivonen for sanity check, but assuming he doesn't see a problem with this, I'll add a conformance requirement to the section that defines itemprop.
Comment 4 Ian 'Hixie' Hickson 2011-12-07 00:35:52 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diff given below
Rationale: Concurred with reporter's comments.
Comment 5 Philip Jägenstedt 2011-12-07 09:16:33 UTC
Fixed in http://html5.org/r/6851