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 9358 - Explanation of content model requirements could be improved
Summary: Explanation of content model requirements could be improved
Status: CLOSED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://dev.w3.org/html5/spec/Overview...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-28 21:01 UTC by Maciej Stachowiak
Modified: 2010-10-04 14:28 UTC (History)
5 users (show)

See Also:


Attachments

Description Maciej Stachowiak 2010-03-28 21:01:16 UTC
Section 1.9 Conformance requirements for authors explains the reason for many conformance requirements.

Here are a few content model errors found on real sites that I am not sure are adequately explained:

* <div> as a child of <h2> or <h3> (in general the fact that headers allow only phrasing content, not flow content)
* <div> as a child of <span> - this seems fairly common, perhaps because it was allowed by HTML4; since <div> has no semantics, it's not obviously a semantic error
* Nested interactive elements (<a> inside <a>, <button> inside <a>, etc)
* <form> in <span>
* <dl> and <ul> only being allowed to contain their specific children.
Comment 1 Maciej Stachowiak 2010-04-04 08:15:26 UTC
(In reply to comment #0)
> * <div> as a child of <span> - this seems fairly common, perhaps because it was
> allowed by HTML4; since <div> has no semantics, it's not obviously a semantic
> error

I was mistaken - HTML4 does not allow it. It would still be helpful to ensure that the reason for this restriction is sufficiently explained.
Comment 2 Ian 'Hixie' Hickson 2010-04-04 08:54:31 UTC
> * <div> as a child of <h2> or <h3> (in general the fact that headers allow only
> phrasing content, not flow content)

"Errors that flag content with dubious semantics"


> * <div> as a child of <span>

Added "Errors that catch cases where the default styles are likely to lead to confusion".


> * Nested interactive elements (<a> inside <a>, <button> inside <a>, etc)

Covered by the new "Errors that catch cases where the default styles are likely to lead to confusion".


> * <form> in <span>

Added "Errors that avoid peculiarities of the parser".


> * <dl> and <ul> only being allowed to contain their specific children.

"Errors that indicate a conflict in expressed semantics".


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 - added examples and the aforementioned new sections
Rationale: Concurred with reporter's comments.
Comment 3 contributor 2010-04-04 08:56:59 UTC
Checked in as WHATWG revision r4966.
Check-in comment: More information on the reasons for authoring conformance criteria. I can't wait to see other W3C and IETF specs, like SVG, Atom, or RDFa, include introduction sections explaining why _they_ all have authoring conformance criteria.
http://html5.org/tools/web-apps-tracker?from=4965&to=4966
Comment 4 Maciej Stachowiak 2010-04-04 09:03:30 UTC
Looks good to me.