W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2011

[whatwg] <comment> element in HTML5 Spec?

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 28 Apr 2011 21:41:13 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1104282130170.19153@ps20323.dreamhostps.com>
On Mon, 13 Dec 2010, Richard Summers wrote:
>
> I was wondering, is there any plan to implement a <comment> element 
> within the HTML5 spec? I?m suggesting this as a complimentary element to 
> the <article> element.

There already is one: <article>! We defined it such that if you nest them, 
the nested ones are defined to be comments. There are some examples of 
this in the spec.


On Mon, 13 Dec 2010, Tab Atkins Jr. wrote:
> 
> 1. Differentiating between the main article and user-generated content 
> in response (you bring this up).  Would this be useful for search 
> engines?  I'm not sure.  Would it be useful to weight comment content 
> differently from article content?  Perhaps weight links in comments less 
> than links in the rest of the page?

This is already possible: a nested <article> has this semantic.


> 2. Providing a bit more information to screen-readers that may navigate 
> by headings or sections, to make it easier to skip to or over the 
> comments on a post.

This is also already supported by virtue of nesting article sections 
meaning that the outline has depth for comments.


> 3. Make the authoring pattern a bit more obvious - rather than having to 
> learn that it's okay and recommended to nest <article>s like that, 
> authors could just naturally gravitate towards using <article> and 
> <comment> together.

It doesn't seem that much simpler.


On Tue, 14 Dec 2010, Richard Summers wrote:
> 
> Using <article> elements within other <article> elements feels a bit 
> like we'd just be replacing <div> for <article>, it seems to remove some 
> of the logical distinction between different types of content.

How so?


On Tue, 14 Dec 2010, Andy Mabbett wrote:
>
> Perhaps what is needed is some kind of "in-reply-to" attribute:
> 
> <article id="beer">I like beer</article>
> <article id="firstreply" in-reply-to="beer">Me too!</article>
> 
> or even:
> 
> <article id="beer">I like beer
>     <article id="firstreply" in-reply-to="beer">Me too!</article>
> </article>

This is already the implied semantic of nesting <article> elements. The 
way to write it is:

   <article>
     I like beer
     <article> Me too! </article>
   </article>

The inner one is by definition a response to (a comment on) the outer one.


On Mon, 13 Dec 2010, Ashley Sheridan wrote:
>
> Would <aside> be more contextually accurate in the case of
> user-generated comments?

Not per the current spec. :-)

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 28 April 2011 14:41:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:03 GMT