[whatwg] Nested list
erik at textivism.com
Mon Jul 13 12:12:59 PDT 2009
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
I've cobbled together a demonstration page to address some of these
issues (more clearly, I hope): http://textivism.com/list-items/
More information about the whatwg