[uf-discuss] Re: dfn design pattern (proposal)

Edward O'Connor hober0 at gmail.com
Tue Aug 21 02:28:25 PDT 2007


> * Arguments for or against the use of dfn as a container for the title
>   design pattern: is this semantic abuse or is it simply  stretching
>   semantics (like the abbr design pattern).

In the interest of forward-compatibility, I think using dfn/@title is a
bad idea.

The HTML 5 draft goes into much more detail about <dfn> then any
previous HTML version, specifying both how to find the <dfn>'s term, and
how to find the relevant <dfn> for some use of the term elsewhere in the
document.

       http://www.whatwg.org/specs/web-apps/current-work/#the-dfn

The incompatibility comes in here:

> Defining term: If the dfn element has a title attribute, then the
> exact value of that attribute is the term being defined. Otherwise, if
> it contains exactly one element child node and no child text nodes,
> and that child element is an abbr element with a title attribute, then
> the exact value of that attribute is the term being defined.
> Otherwise, it is the exact textContent of the dfn element that gives
> the term being defined.
> 
> If the title attribute of the dfn element is present, then it must
> only contain the term being defined.

So using dfn/@title to contain something other than the term being
defined is probably not a good idea.

This is similar to how we're trying to avoid the use of @rev now, since
HTML 5's dropped it.


-- 
Ted



More information about the microformats-discuss mailing list