W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2009

[whatwg] Nested list

From: Erik Vorhes <erik@textivism.com>
Date: Mon, 13 Jul 2009 14:12:59 -0500
Message-ID: <22d65dda0907131212u4ec9b857j9b8336e34d33f086@mail.gmail.com>
On Mon, Jul 13, 2009 at 11:34 AM, Ryosuke Niwa<rniwa at google.com> wrote:
>
> We can define it in this way.  When a list A appears within anther list B
> (without being enclosed by li), then the list A is a sublist of B and that
> lists A and B constitutes a tree structure.  When a list C appears within a
> list item of the list B, then list C is a list appears in a paragraph of a
> list item of B.  i.e. C ad B does not constitute a tree structure.
>
> This can be seen from the way those two constructs are rendered in major
> UAs.  Namely, when lists A and B are nested, you don't see a bullet before
> A.  Because A and B together constitutes a tree-structure, this rendering is
> semantically correct.  On the other hand, UAs render a bullet before C.  B
> has a list item that happens to contain a list, but that doesn't prevent B
> from having a bullet for that particular list item.
>

While I think I understand your description, I'm a little concerned
for a few reasons.

1. Depending on context, lists within lists don't render differently
than lists within list items do.

2. How does the User Agent determine if a list within a list is part
of the preceding <li> if that <li> isn't closed? Is it part of the
<li> or something on its own?

3. Why should <ol> and <ul> provide different semantic meaning
depending on context? Won't that lead to confusion?

4. If two lists aren't actually supposed to be items in the same list,
why would you group them as a list? Shouldn't they be separate
entities entirely?

I've cobbled together a demonstration page to address some of these
issues (more clearly, I hope): http://textivism.com/list-items/

Erik Vorhes
Received on Monday, 13 July 2009 12:12:59 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:14 UTC