[whatwg] New attributes would degrade better than new elements

30.10.2011 1:18, Eric Sh. wrote:

> I heard there are plans to create new tags for layouts to replace the
> use of tables as layout elements.

Maybe such rumors have been caused by taking some parody for real.

> You keep speaking of creating new attributes instead of adding new tags
> but then what is the point in adding new attributes instead of simply
> using classes which are far more compatible on past browsers?

That would correspond to the microformats approach, which is the 
simplest way of adding low-level metadata. But it seems that the search 
engine consortium decided to favor another approach, microdata. Note 
that it does not use new elements - even though it adds completely new 
semantics - but new attributes.

I think I have mentioned the class attribute in this discussion, as well 
as the point that using class to add semantics could conflict with 
existing usage. When authors have written <div class=nav>, they didn't 
expect browsers or other software to start treating the element in their 
own ways, according to some future specification. They expected the 
class name space to be for them to use freely.

One might ask how often does a class name like "nav" relate to something 
else than a navigation block, in practice. In theory, it could be just 
anything, of course. And while <div class=nav>...</div> is a common 
paradigm, <div class=article>...</div> is not, and "article" might well 
have been used as a class name with no intent of declaring the content 
as a syndicatable article or getting some special default "article 
styling" that browsers might apply.

> And WHATWG is working hard to ensure compatability of new additions with
> old browsers(the DOCTYPE for example).

I don't see how the DOCTYPE trickery relates to this. The only things 
that the <!doctype html> construct achieves are putting browsers to 
"standards" more (something that can be achieved by the use of any 
"private" doctype declaration) and informing "validators" (linters) that 
they should treat the document according to what happens to be the 
Living Standard's content today.

> So I am positive issues like this one were already discussed and
> dismissed for some reason or another,

I am positive that if there were a solid ground for the introduction of 
new elements like <nav>, <article>, etc., it would already have been 
presented in this discussion, if not in the Living Standard itself.

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/

Received on Saturday, 29 October 2011 23:16:02 UTC