[whatwg] article/section/details naming/definition problems

On Wed, 16 Sep 2009, Keryx Web wrote:
>
> 2009-09-16 12:03, David Workman skrev:
> > think 'article' is more suitable than 'post' or 'entry' semantically.
> 
> I am thinking about the mental model, more than pure semantics.
> 
> Maybe a *comparison* to entry in Atom and item in RSS in the non 
> normative text could be beneficial?

Added a brief mention of <atom:entry>.


On Wed, 16 Sep 2009, Jeremy Keith wrote:
>
> So after a lot of chat on IRC [1], here's what I've been able to establish
> about <section> and <article>:
> 
> * An <article> is a specialised kind of <section>.
> * All <article>s are <section>s but not all <section>s are <article>s (in the
> same way that all <acronym>s are <abbr>s but not all <abbr>s are <acronym>s).

I't more like how all <nav>s are <section>s but not all <section>s are 
<nav>s.


> * A <section> is a chunk of related content whereas an <article> is an
> *independent* chunk of related content.
> * The interpretation of what qualifies as "independent" varies widely.
> 
> Some use cases are very clear. Blog posts, for example, are clearly
> independent sections.

I've removed "independent" from the spec. The phrase "self-contained", 
which was also used, is hopefully less confusing.


> Other use cases are less clear. Various guidelines were proposed to try to
> figure out when a section is independent e.g. would it have a permalink? or
> would you distribute it? but these weren't robust enough.
> 
> Here are some ambiguous use cases:
> 
> An FAQ question and answer:
> http://wiki.whatwg.org/wiki/FAQ#How_does_the_WHATWG_work.3F
> This content stands alone. It is independent. It has a header. It has a
> permalink.
> But some people rejected using <article> for this case because the content
> wouldn't be syndicated (even though syndication is a suggested *guideline* not
> a *criteria* for using <article>).

If someone thinks that FAQ entries are syndicatable articles, then there's 
nothing wrong with them using <article>.


> A author bio:
> http://resume.chuckharmston.com/#about
> This content stands alone. It is independent. It can be reused or even
> distributed (for example, if the person were speaking at conferences).
> Currently it uses <section>. Should it be an <article>?

It could use <article>, though I don't see why one would bother. It's not 
like that page is ever going to be converted to Atom, say, and the various 
elements are already styled fine without needing a hook for that element.


> A widget.
> Although the spec specifically mentions widgets that can be reused, I haven't
> been able to find any use cases of this yet. I don't that <article> is an
> element name that readily springs to mind for developers publishing widgets.

The widgets on iGoogle are an example.


> A blog comment.
> The spec specifically recommends using <article> for blog comments but this
> would seem to violate the criteria of independence. Blog comments don't make
> sense outside of the context of their blog post. Nonetheless, blog comments
> are often syndicated in a feed. But, as already stated, syndication alone is
> not enough of a reason to use <article> ? the content must be independent.

I've removed the word independent now.


> Hixie outlined three reasons for having a separate <article> element:
> 
> > replacing <div class="post"> so that you don't need to use classes for 
> > marking up blog posts
> >
> > enabling trivial conversion of html to atom for syndication
> >
> > and making it easier to navigate a page that has multiple articles 
> > when using accessibility tools
> 
> The third use case is already solved with <section>.

<section> wouldn't easily let you jump from blog post to blog post when 
the posts are complicated multi-sectioned affairs, especially when the 
page might have multiple sections, only one of which is the main article 
content.


> The second use case can be handled with an attribute on <section> or 
> simply by looking for the presence of a <time> element with a @pubdate 
> attribute within a <section>.

Neither of these options are as neat as a new element, IMHO.


> The first use case is a valid point but as Hixie himself said when 
> discussing <cite>:
> 
> > Why not <color> for marking up colours, <price> for marking up prices, 
> > <mortgagerate> for marking up mortgage rates, <postaladdress> for 
> > addresses, <boardgame> for names of board games, <vat> for the cost of 
> > sales tax in advertising...
> 
> Throwing in a new element (<article>) when there is an existing element 
> that shares 99% of its DNA (<section>) seems like overkill.

The same could be said of <aside> and <nav>. However, I think all four 
have their place, as they provide distinct and useful distinctions for 
content creators. Naturally, nobody is required to use them, but they make 
it possible to address the use cases given above more easily than would 
otherwise be possible.


> Further discussion on IRC showed a belief that authors would find it easier to
> style an element such as <article> (using the CSS element selector) than an
> element with an attribute  such as <section article=""> (using the CSS
> attribute selector) or a class such as <section class="article"> (using the
> CSS class selector).
>
> I understand that concern, but then how are authors supposed to style 
> blog comments differently from a blog post? After all, they're both 
> supposed to use the same element: <article>.

article article { }


> After all that discussion, my conclusions are:
> 
> * <section> and <article> are so similar, I'm not convinced that two separate
> elements are needed.

I actually think there's more of a case to be made for <article> than 
<section>.


> * If <article> stays, there needs to be a good testable criteria to determine
> when a <section> should be an <article>.

I don't know what that would be.


> * The current recommendation to mark up blog comments using the <article>
> element contradicts the criteria of independence.

I've removed that contradiction.


> * The use case of marking up application widgets with <article> 
> stretches the definition and makes it hard to come up with a good 
> criteria for <article>.

I think it's the same concept -- a self-contained blob of reusable 
content.


On Wed, 16 Sep 2009, Divya Manian wrote:
> 
> The IRC conversation that Jeremy Keith[1] highlighted was really useful. 
> From there, this is my understanding of the differences between 
> <section> and <article>, forgive me if I am not rigorous in my usage of 
> English:
> 
> 1. section to "cut" or "section" different parts of the layout of the 
> webpage
> 
> 2. article is used for each similar content, each blog post in a set of 
> (1 or more) blog posts, each user member avatar in a set of user member 
> avatars, each product in a set of products.

I'm not sure about the avatar case, but otherwise yes.


> 3. articles always occur within a section except in rare occasions when 
> there is nothing else other than the specific article on the page as 
> content.

I wouldn't put it quite that strongly, but sure, often <article>s will be 
in a <section> (and will have <section>s of their own).


> The usecase that leaps to me is:
> HTML 4:
> 
> <div class="maincolumn">
> <div class="item">
> News entry 1
> </div>
> <div class="item">
> News entry 2
> </div>
> </div>
> 
> HTML 5:
> <section class="maincolumn">
> <article>
> News entry 1
> </article>
> <article>
> News entry 2
> </article>
> </section>

Yup.


> I often use <div class="item"> to mark up the smallest large unit of content
> that is repeatable and my understanding is that <article> would be a good
> replacement of that.

If it's self-contained reusable content, then sure. (You might also repeat 
more fine-grained content, e.g. each line in a blogroll is a "repeat" of 
the blogroll line concept, but that's not an <article>.)


On Wed, 16 Sep 2009, Judson Collier wrote:
>
> I really don't see the relevency of <article> as anything other than an 
> blog post or article- this is the obvious definition. If you are going 
> to keep article, diverting the definition to coments and widgets is way 
> off the beaten path. It'd be cool to see some type of user generated 
> content tag, but that's a bit superflous.

The concept of "a self-contained unit of reusable content" seems 
emminently applicable to comments and widgets.


> However, one single specialized <section> tag begs for *more 
> *specialized <section> tags. Keep that in mind.

We have three already: <nav>, <aside>, <article>.


On Wed, 16 Sep 2009, Erik Vorhes wrote:
> 
> <entry> (which has already been proposed) might more logically suit the 
> bill for standalone articles (in a blog or whatever) as well as 
> blog/forum comments. And since it's part of the Atom spec., there's some 
> precedent for defining its use.
> 
> That said, I don't have a problem with <article> as a special kind of 
> <section> (though having articles nested within articles doesn't agree 
> with my brain at this point).

Renaming <article> to <entry> might make sense, I guess. It seems like 
it'd get more abuse, though. It sounds quite generic.


On Wed, 16 Sep 2009, Gordon P. Hemsley wrote:
> 
> What about <item>? (Directly, it's a coincidence that RSS happens to 
> have the same-named element, as I just used a thesaurus. But perhaps 
> [indirectly] there's a reason RSS uses <item> to begin with. And, after 
> all, it's supposed to be used as a hint that it could be syndicated 
> content, right?)

I think <item> is definitely too generic-sounding.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Wednesday, 23 September 2009 05:55:50 UTC