- From: Dannii <curiousdannii@gmail.com>
- Date: Sun, 1 Jul 2007 13:07:19 +1000
- To: "Lachlan Hunt" <lachlan.hunt@lachy.id.au>
- Cc: "aurélien levy" <aurelien.levy@free.fr>, public-html@w3.org
- Message-ID: <af3e73120706302007q4e1748c7hd0deeb632c148d7d@mail.gmail.com>
Isn't it really: <dl> <dt> Term A </dt> <dd> Definition 1 of Term A </dd> <dd> Definition 2 of Term A </dd> <dt> Term B </dt> <dt> Synonym for Term B </dt> <dd> Definition of Term B </dd> </dl> On 7/1/07, Lachlan Hunt <lachlan.hunt@lachy.id.au> wrote: > > > aurélien levy wrote: > >>> because actually i can do : > >>> > >>> <dl> > >>> <dt> 1st terme </dt> > >>> <dd> 1st terme description </dd> > >>> <dd> 2nd terme description </dd> > >>> <dt> 2nd terme </dt> > >>> <dt> 3rd terme</dt> > >>> <dd> 3rd terme description</dd> > >>> </dl> > >>> > >>> with no way for AT to know that 2nd terme description is actually > >>> the 2nd terme description and not the second description of the > >>> first terme > > > > the html 5 spec say : > > dt can be before |dd| or |dt| elements inside |dl| elements. > > dd can be after |dt| or |dd| elements inside |dl| elements. > > > > that's the case in my example > > I think you're misunderstanding the spec. That's simply describing the > order in which elements may appear within the dl. > > The content model for <dl> states: > > | Zero or more groups each consisting of one or more dt elements > | followed by one or mode dd elements. > > So the groups are created by implicitly grouping all consecutive <dt> > elements followed by all consecutive <dd> elements. Regardless of what > you wanted to achieve in your example, the "2nd terme description" is > defined to be the second dd of the first group. > > >> It's also not clear what the use case for doing so is. Just swap > >> the <dt> and <dd> for the 2nd term and description, and it gives > >> the intended meaning. > > > > Because i can want to have my description visually before his term (i > > know i can achieve that with css but most of people simply choose the > > simplest way). > > Even a full dd dt structure in this order validate in html 4 > > > http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.fairytells.net%2Fdltest2.html > > In HTML4, although it would validate, it would never really have the > meaning you want. The first <dd> would have no associated term, and the > last <dt> would have no associated description. HTML5 fixes this bug in > HTML4 that allowed descriptions without terms because it makes no sense. > > Ideally, the correct way to achieve the layout you want would be with a > stylesheet, or possibly XBL. > > Personally, I'm not convinced of use case. I just can't imagine why one > would want to order them like that using any method. But if that is a > real use case, and is something you have done before, it would help if > you could provide real world examples to demonstrate how and explain why > it has been used. You can then document it in the wiki, and record the > various possible solutions with their pros and cons. > > Robert Burns wrote: > > Its possible we could add more structure to a definition list like > > XHTML2 did with: > > > > <dl> > > <li> > > <dt></dt> > > <dd></dd> > > </li> > > </dl> > > > > This might help make a stronger association and even allow reversing > > the normal HTML 4.01 order for these elements. > > > > If there's a use case for such more complicated definition lists we > > would need to come up with though (if necessary). > > That structure has been considered before, but, IIRC, so far rejected > due to lack of convincing use cases. > > (if you're going to document this in the wiki, I recommend searching the > WHATWG archives for related discussion and include <di> as a possible > alternative to <li>) > > -- > Lachlan Hunt > http://lachy.id.au/ > >
Received on Sunday, 1 July 2007 03:07:23 UTC