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 14002 - Allow DT to be after DD if there is only one DT/DD pair in DL
Summary: Allow DT to be after DD if there is only one DT/DD pair in DL
Status: RESOLVED WONTFIX
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-01 22:25 UTC by Marat Tanalin | tanalin.com
Modified: 2011-09-03 19:45 UTC (History)
4 users (show)

See Also:


Attachments

Description Marat Tanalin | tanalin.com 2011-09-01 22:25:46 UTC
http://www.w3.org/TR/html5/grouping-content.html#the-dl-element

Following should be valid:

<dl>
	<dd>Description</dd>
	<dt>Term</dt>
</dl>

Since the DL has only one DT and one DD, there is no an ambiguity here, it's evident that DT and DD are interlinked, so this should be considered semantically equivalent to:

<dl>
	<dt>Term</dt>
	<dd>Description</dd>
</dl>

Thanks.
Comment 1 Simon Pieters 2011-09-02 07:02:01 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: Rejected
Change Description: no spec change
Rationale: This seems error prone (if the author later adds more groups) and confusing (which order is correct?). Also no use case provided.
Comment 2 Marat Tanalin | tanalin.com 2011-09-02 15:03:05 UTC
(In reply to comment #1)

> Status: Rejected

Simon, have you made this decision single-handedly?

> This seems error prone (if the author later adds more groups) and
> confusing.

Do you have a proof stats or investigations? Otherwise, this is not more than your personal guessworks. I don't think this is error-prone or confusing. If there is only one DT and only one DD in DL, then there is no ambiguity at all.

> (which order is correct?)

That's what spec exists for: spec should just clearly describe particular markup usage.

> Also no use case provided.

Usecase is, for example, product title and its image and/or description in product list (in online shops, on manufacturer's website, etc.). Such items are often marked-up as DLs, while title of a product is often placed at the bottom of the item, not at the top.

Besides, there is nothing to change in browsers. It's enough to just add following (or similar) clear phrase to the HTML spec:

<<
If DL contains exactly one DT and one DD, then DT and DD should be considered a group regardless of whether DT is before DD or DD is before DT.
>>

Thanks.
Comment 3 Ian 'Hixie' Hickson 2011-09-03 19:45:14 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: Rejected
Change Description: no spec change
Rationale: I concurr with Simon. In fact, I'd go even further. It's far more likely that an author who has a single <dl> with first a <dd> and then a <dt> has accidentally typoed the element names and meant for the <dd> to be a <dt> and the <dt> to be a <dd>. As such, it's our responsibility to make it easy for validators to catch this.

(In reply to comment #2)
> 
> Usecase is, for example, product title and its image and/or description in
> product list (in online shops, on manufacturer's website, etc.). Such items are
> often marked-up as DLs, while title of a product is often placed at the bottom
> of the item, not at the top.

I would recommend using <figure> for this.