W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > July 2012

[Bug 17030] Lists should permit interleaved structuring

From: <bugzilla@jessica.w3.org>
Date: Thu, 05 Jul 2012 02:53:45 +0000
Message-Id: <E1SmcCP-0003Bu-CK@jessica.w3.org>
To: public-html-bugzilla@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=17030

theimp@iinet.net.au changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |theimp@iinet.net.au

--- Comment #1 from theimp@iinet.net.au 2012-07-05 02:53:44 UTC ---
Originally, <ol> meant Ordered List, not Numbered List. User Agents had to
convey order somehow, which could have been anything from numbering, to using
an ever-larger font for higher-value items, to inserting the text "Ordered
List" before the list block.

The principle is that <ol> and <ul> are one-dimensional; the "numbering" of
<ol> list items is as meaningless as the bullets against <ul> list items. If
the numbers mean something, it's content, which makes it inappropriate for a
one-dimensions list, and should be specified another way. Otherwise, it's
presentation, and should be specified with eg. stylesheets.

In practice, people mostly decided that <ol> specifically implied numbering,
which brought the above assumption into collision with the expectation that
numbering should be content that they can control.

So, implementation of the advanced CSS solution (
http://www.w3.org/TR/css3-lists/ ) has been idle for almost a decade, while
conversely, every implementor has dome something different to each other (See
for example Bug 14548).

And then there's the accessibility concerns which transcend HTML/browsers (see
for example Bug 13668)

This conflict of content/structure/presentation has also made other messes. See
for example Bug 17632 and Bug 17633. It seems that it's no longer possible to
treat ordered lists specifically as being only structural, only presentational,
or only content. All three concepts must be implemented consistently with each
other for predictable results. HTML5 does not intend to address this
decisively.

And this has all made it extremely difficult to properly mark up things like
legal documents, where, for example, "Section 1A" *must* have the number "1A"
in all user agents and under all circumstances. Difficult to the point that the
usual solution is to not use semantic markup, and just have a big plain text
dump.

---

Now, as for a solution to the issue you've mentioned specifically, try using
the DL/DT/DD structure, where you have a list where the numbering is critical.

Something like:

<style>
dl {
background-color: #0000ff;
}
dt {
display: inline;
float: left;
width: 3em;
margin-right: 1em;
text-align: right;
background-color: #ff0000;
}
dd {
background-color: #00ff00;
margin-left: 4em;
}
dt:after {
content: ".";
}
</style>
<dl>
<dt>abc</dt>
<dd> def ghi</dd>
</dl>

The benefit of this is made even better for things like legal documents, where
complex markup (such as <span> or <abbr>) can be used within the "list marker"
(dt). You can have sublevels (nest more DLs within DTs), and individual styles,
and so on. Be careful with completely unnumbered (ie. empty) entries, though;
it's syntactically legal, but semantically problematic.

In any case; don't use <ol> anywhere that the numbering itself is vital (then
it's content; use <dl> or <table>). This is true now and will remain true after
HTML5 is standardized.

-- 
Configure bugmail: https://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 July 2012 02:53:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 5 July 2012 02:53:47 GMT