- From: <bugzilla@jessica.w3.org>
- Date: Thu, 05 May 2011 17:57:20 +0000
- To: public-html-bugzilla@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=12609
Summary: Allow <ol>/<ul> to have <ol>/<ul> children
Product: HTML WG
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: HTML5 spec (editor: Ian Hickson)
AssignedTo: ian@hixie.ch
ReportedBy: Simetrical+w3cbug@gmail.com
QAContact: public-html-bugzilla@w3.org
CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,
public-html@w3.org
Consider the following markup:
<ol>
<li>foo</li>
<li>bar</li>
<li>baz</li>
</ol>
Suppose the user selects "baz", and does execCommand("indent"). The expected
behavior (observed in all browsers, plus Word and OpenOffice.org) is for the
second item to be indented into its own sublist. Opera 11.10 produces the
following markup:
<ol>
<li>foo</li>
<li>bar
<ol>
<li>baz</li>
</ol>
</li>
</ol>
IE9, Firefox 4.0, and Chrome 12 dev all produce this instead:
<ol>
<li>foo</li>
<li>bar</li>
<ol>
<li>baz</li>
</ol>
</ol>
Visually they're the same, assuming default styles. However, the latter DOM is
more convenient to work with. Specifically, if the user now selects "bar" and
does "indent" again, we want it to be indented to the same level as "baz", and
do not want the indentation of "baz" to change, because the user didn't select
"baz".
With the IE/Firefox/Chrome output, this is easy: just move the whole <li> into
its next sibling. With the Opera output, it's more complicated. It gets still
more complicated if you have multiple children that are lists. So I'd really
like to normalize any markup I get into the IE/Firefox/Chrome form, so that
there are no lists that are children of <li>s, and then the rest of the
algorithm is simplified considerably.
Specifically, I'd like the content model of the ol and ul elements to become
zero or more groups, each group consisting of a single li element followed by
at most one ul or ol element. The items of the list should then be the li
element children in tree order, except that if an li element is followed by a
ul or ol element, that sibling should have the semantics of a list of sub-items
(the same as if it were the last child of the li).
I don't think it needs to be valid to have more than one ol or ul in a row, or
to have one as the first child of a list, because I don't see any reasonable
semantics to assign to those cases. I also have no opinion on the dl element
here, since I don't have a use-case for changing its definition.
--
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Thursday, 5 May 2011 17:57:23 UTC