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 15056 - Three suggestions to HTML5
Summary: Three suggestions to HTML5
Status: RESOLVED WONTFIX
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-04 13:41 UTC by Ian Yang
Modified: 2011-12-08 01:21 UTC (History)
5 users (show)

See Also:


Attachments

Description Ian Yang 2011-12-04 13:41:18 UTC
=== SUGGESTION 1 ===

Wrap dt and dd elements into li elements.

Instead of:

<dl>
	<dt></dt>
	<dd></dd>
	<dt></dt>
	<dd></dd>
	<dt></dt>
	<dd></dd>
</dl>

Make it:

<dl>
	<li>
		<dt></dt>
		<dd></dd>
	</li>
	<li>
		<dt></dt>
		<dd></dd>
	</li>
	<li>
		<dt></dt>
		<dd></dd>
	</li>
</dl>



=== SUGGESTION 2 ===

Deprecate <small></small>, add a more semantic <note></note>.



=== SUGGESTION 3 ===

Add an element which can represent "inline heading". For example:

<ul>
	<li><span class="hd">Tel</span>: 123-456-789</li>
	<li><span class="hd">Fox</span>: 123-456-789</li>
</ul>

Can we have something like:

<ul>
	<li><ihd>Tel</ihd>: 123-456-789</li>
	<li><ihd>Fox</ihd>: 123-456-789</li>
</ul>



Kind Regards,
Ian Yang | Front End Web Developer | ian.html@gmail.com
Comment 1 kevin davies 2011-12-05 08:44:22 UTC
Re: Suggestion 1
- What is the reasoning behind wrapping dt/dd pairs in list elements?

Re: Suggestion 2
- <small> is described as being for 'small print' in which case <small> would be semantically correct. 

Re: Suggestion 3
- could this be marked up as:

<dl>
    <dt>Tel:
    <dd>123-456-789
</dl>
Comment 2 Ian Yang 2011-12-05 09:28:30 UTC
(In reply to comment #1)

Thanks for the reply.

=== Re: 1. ===
As you and all of us have in common sense that dt/dd is a pair, it's more semantic to group them together.

And because definition list is a list, a list should have list items. However, the current structure of definition list make dt and dd looks like each of them is an independent list item, and are also hard to read.

Sometimes it's even difficult to style definition list because of its lack of li element (dt and dd are not group together).


=== Re: 2. ===
According to English dictionaries, "small print" is used in contracts, and is containing qualifications or restrictions. Therefore its definition is quite different with "note". "Note" can be used at anywhere, but "small print" can't be used like that.


=== Re: 3. ===
That's also a nice usage of definition list. But as it was described above, sometimes it's hard to style definition list because of its lack of li element.
Comment 3 Ian 'Hixie' Hickson 2011-12-07 23:15:35 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: Please file one issue per bug.

"More semantic" is not a valid use case.

Even if it was, there's nothing "more semantic" about adding extra markup when the structure can be completely determined programatically already. The groups in <dl>s are very well-defined. Adding extra markup wouldn't make them better-defined; it would just introduce more possible ways for authors to make mistakes.

<small> is intended for side comments and small print. If your notes are side comments, then <small> is already the appropriate semantic element, and changing the name of the element (leaving the definition the same) would not make anything "more semantic".

If your notes are not side comments, then <small> has nothing to do with them. If this is the case, please elaborate (in a new bug) on what exactly your use case is so that we can fully examine if it needs a new element.

Regarding your final point: <dl> is indeed the appropriate element to use if you have name-value pairs like that. Specifically for the idea of a _heading_ in a list item, though, you can use something like <strong> to indicate what is important, or maybe <b> to indicate keywords, depending on what exactly you are doing if <dl> isn't appropriate.
Comment 4 Ian Yang 2011-12-08 01:21:43 UTC
1.

So far, I haven't see any poll or study which can prove "Adding extra markup wouldn't make them better-defined" and "it would just introduce more possible ways for authors to make mistakes". At least my viewpoints are the opposite.

I was recently involved in a project in which I have to add one large image next to each <dt>/<dd> pair in a FAQ-like content. However, because currently there is no <li> allowed in <dl> in HTML source code, I had to wrap each <dt>/<dd> pair with a <li> through javascript and then I can define background images for <li>s.

Not that I suggested introducing <li>s for <dl> purely out of styling purpose, but the case above reminded me that, for both reasonable structure and convenient styling, <dl> needs <li>s like <ul> and <ol> do.


2.

Let us simply face the truth that the meaning of "small" has nothing to do with "side comment" in English dictionaries. Wouldn't it be far-fetched to give irrelevant meanings to a deprecated element?


3. Well, I'm not sure if "Tel" and "Fax" are that important enough to deserve strongly emphasis. Maybe definition list is enough to do the job, as long as I don't have to add one large image next to each <dt>/<dd> pair.