Re: [whatwg] Suggest making dt and dd valid in ol

2012-07-31 Thread Leif Halvard Silli
Ian Hickson on Mon, 16 Jul 2012 04:31:44 + (UTC), wrote:

 It's certainly true that many element names are derived more from 
 historical accidents than their current semantics, but ol and ul are 
 semantically quite different, as the spec describes.
 
 Specifically, ol implies that the order of the list cannot be changed 
 without affecting the meaning of the page, whereas the order in a ul 
 list is merely aesthetic.

Thanks. I learned a lot from this thread.

Just now took myself in writing the following in a Web page: Regarding 
the last list-item, then …. And then I realized that that last 
list-item occurred inside a ul list. Which meant that I had to (or 
at least I did) change the list from ul to ol. I also replaced the 
numerical list-item numbering with circles, to signify that the items 
was not numbered.

In fact, I frequently deal with texts where there is homework items 
where each homework item contains one or more sub-items. For these 
sub-items, I use olli…li…/ol — which seems logical as long as 
there more than one sub-item. But what - at least for the time being - 
there is only one sub-item? I want the sub-item to have a bullet, or 
similar, to signify that it is a sub-item. I don't want a number. At 
the same time, there is no principal difference between that lone 
sub-item and the multiple sub-items in the nearby homework item.

So one option that comes to mind is to do the following, in order to be 
certain that sole-items have a different style:
olli:first-child:last-child {list-style-type:circle}

Should I want to add one item more, then I automatically get numbering.

What strikes me is that I almost never would like to use ul anymore. 
Only when I would like to explicitly say that the meaning of this 
document does not change whichever way you list the list-items, only 
then would I pick ul.

Which makes me wonder: Why is not value=number allowed for li 
inside ul? E.g. I might want to add accidental numbers to the 
list-items while at the same time also wanting to say that the page 
does not change meaning whichever way you order the items?

I also wonder: Would it not make sense to advice, when uncertain about 
whether order is significant, advice authors to pick ol over ul? 
For instance the sub-items of our homework items: Since the order of 
the sub-items often risks becoming significant, it seems smart to pick 
ol and not ul - even if ul sometimes could work too.
-- 
Leif H Silli

Re: [whatwg] Suggest making dt and dd valid in ol

2012-07-31 Thread Leif Halvard Silli
Ian Yang on Thu, 19 Jul 2012 15:04:48 +0800, wrote:

 From previous discussions, some people had suggested possible markup for
 life cycle type contents. And personally I will stick to using dl until
 there is a better solution.
 
 There is still one thing left unanswered. And that's whether we will be
 able to put li inside dl.
 
 Let's consider form we used often. When coding a form, none of us make it
 like the following one because that's obviously very ugly and, most
 importantly, it hurts our eyes!
 
 form method=post action=/
 label for=nameName/label
 input id=name type=text
  [...]
 Instead, we use div (some people use p) to group sub elements
  [...]
 form method=post action=/
 div
 label for=nameName/label
 input id=name type=text
 /div

Would it not be better if, rather than div, you used fieldset? Then 
it would not only benefit your eyes but also the semantics:

  fieldset
 label for=nameName/label
 input id=name type=text
  /fieldset

There is even the option that you wrap the label around the input - 
then you can drop the @id too - and be semantic as well:

  labelName
 input type=text
  /label

This way you can 'increase' both the semantics and the 'eye wellness'.

 Like above examples, the following dl is not well organized, and it's
 also a pain to read it:
 
 dl
 dtLorem Ipsum/dt
 ddSit amet, consectetur adipiscing elit./dd
 dtAliquam Viverra/dt
 ddFringilla
   [... etc ...]
 /dl
 
 If developers could, *optionally*, use li to wrap each group, the code
 would be more organized:
 
 dl
 li
 dtLorem Ipsum/dt
 ddSit amet, consectetur adipiscing elit./dd
 /li
 li
 dtAliquam Viverra/dt
 ddFringilla nulla nunc enim nibh, commodo sed cursus in./dd
 /li
   [...]
 /dl
 
 And usually life cycle type contents are presented as circles. Without
 li(s), it will be hard to style them.

How about the following method - essentially a variant of 
ollidfnEgg/dfn: A white egg. [etc]/ol, as proposed by by Ian:

ollifigurefigcaptionLorem Ipsum/figcaption
  Sit amet, consectetur adipiscing elit.
/figure/li
lifigurefigcaptionAliquam Viverra/figcaption
  Fringilla nulla nunc enim nibh, commodo 
  sed cursus in./figure/li/ol

Or, if one wishes, one could drop the olli…/li/ol completely 
and  instead e.g. do the following: 

stylefigure figure{display:list-item}/style/headbody
figure
figure
  figcaptionLorem Ipsum/figcaption
  Sit amet, consectetur adipiscing elit.
/figure
figure
  figcaptionAliquam Viverra/figcaption
  Fringilla nulla nunc enim nibh, commodo 
  sed cursus in.
/figure
/figure

 Since the *optional *use of li in dl could solve many problems, may we
 have li being valid in dl?

The most serious problem with that proposal seems to me to be that the 
li only have styling functionality. I think one would have to define 
it as a new list type, where li has semantic meaning, and then it 
could perhaps work.
-- 
Leif Halvard Silli

Re: [whatwg] Suggest making dt and dd valid in ol

2012-07-31 Thread Ian Yang
On Wed, Aug 1, 2012 at 12:56 AM, Leif Halvard Silli 
xn--mlform-...@xn--mlform-iua.no wrote:

 Ian Yang on Thu, 19 Jul 2012 15:04:48 +0800, wrote:

  From previous discussions, some people had suggested possible markup for
  life cycle type contents. And personally I will stick to using dl
 until
  there is a better solution.
 
  There is still one thing left unanswered. And that's whether we will be
  able to put li inside dl.
 
  Let's consider form we used often. When coding a form, none of us make
 it
  like the following one because that's obviously very ugly and, most
  importantly, it hurts our eyes!
 
  form method=post action=/
  label for=nameName/label
  input id=name type=text
   [...]
  Instead, we use div (some people use p) to group sub elements
   [...]
  form method=post action=/
  div
  label for=nameName/label
  input id=name type=text
  /div

 Would it not be better if, rather than div, you used fieldset? Then
 it would not only benefit your eyes but also the semantics:

   fieldset
  label for=nameName/label
  input id=name type=text
   /fieldset


If I remember correctly, fieldset is for grouping in complex and large
forms whose fields needs to be grouped into different categories. So it
might be improper to use it as dividers in simple and small forms.


There is even the option that you wrap the label around the input -
 then you can drop the @id too - and be semantic as well:

   labelName
  input type=text
   /label

 This way you can 'increase' both the semantics and the 'eye wellness'.


I once was thinking about that idea, too, and I gave it up. I have to admit
that it was mainly because of styling reasons. Putting input inside
label can cause styling inconveniences in many situations.

But look at that structure, label is literally used for wrapping label
texts, so putting a input which is not label texts inside a label is
far-fetched and non-semantic, isn't it?



  Like above examples, the following dl is not well organized, and it's
  also a pain to read it:
 
  dl
  dtLorem Ipsum/dt
  ddSit amet, consectetur adipiscing elit./dd
  dtAliquam Viverra/dt
  ddFringilla
[... etc ...]
  /dl
 
  If developers could, *optionally*, use li to wrap each group, the code
  would be more organized:
 
  dl
  li
  dtLorem Ipsum/dt
  ddSit amet, consectetur adipiscing elit./dd
  /li
  li
  dtAliquam Viverra/dt
  ddFringilla nulla nunc enim nibh, commodo sed cursus in./dd
  /li
[...]
  /dl
 
  And usually life cycle type contents are presented as circles. Without
  li(s), it will be hard to style them.

 How about the following method - essentially a variant of
 ollidfnEgg/dfn: A white egg. [etc]/ol, as proposed by by Ian:


 ollifigurefigcaptionLorem Ipsum/figcaption
   Sit amet, consectetur adipiscing elit.
 /figure/li
 lifigurefigcaptionAliquam Viverra/figcaption
   Fringilla nulla nunc enim nibh, commodo
   sed cursus in./figure/li/ol

 Or, if one wishes, one could drop the olli…/li/ol completely
 and  instead e.g. do the following:

 stylefigure figure{display:list-item}/style/headbody
 figure
 figure
   figcaptionLorem Ipsum/figcaption
   Sit amet, consectetur adipiscing elit.
 /figure
 figure
   figcaptionAliquam Viverra/figcaption
   Fringilla nulla nunc enim nibh, commodo
   sed cursus in.
 /figure
 /figure


They looks fancy. However, I have a feeling that a life cycle should be a
definition list, and the above examples don't possess the meaning
definition list. I'm not sure if I'm correct or not. Let me know if I'm
not.

And figure is used in contents which have context, typically articles or
blog posts, to illustrate its context. So it might not be an idea element
inside li.



  Since the *optional *use of li in dl could solve many problems, may
 we
  have li being valid in dl?

 The most serious problem with that proposal seems to me to be that the
 li only have styling functionality. I think one would have to define
 it as a new list type, where li has semantic meaning, and then it
 could perhaps work.
 --
 Leif Halvard Silli


Excuse me, but I'm not sure if I understand you. li means list item.
That's very self-explanatory and semantic.


Sincerely,
Ian Yang


Re: [whatwg] Suggest making dt and dd valid in ol

2012-07-31 Thread Ian Yang
On Wed, Aug 1, 2012 at 9:26 AM, Ian Yang i...@invigoreight.com wrote:


   Like above examples, the following dl is not well organized, and it's
  also a pain to read it:
 
  dl
  dtLorem Ipsum/dt
  ddSit amet, consectetur adipiscing elit./dd
  dtAliquam Viverra/dt
  ddFringilla
[... etc ...]
  /dl
 
  If developers could, *optionally*, use li to wrap each group, the code
  would be more organized:
 
  dl
  li
  dtLorem Ipsum/dt
  ddSit amet, consectetur adipiscing elit./dd
  /li
  li
  dtAliquam Viverra/dt
  ddFringilla nulla nunc enim nibh, commodo sed cursus in./dd
  /li
[...]
  /dl
 
  And usually life cycle type contents are presented as circles. Without
  li(s), it will be hard to style them.

 How about the following method - essentially a variant of
 ollidfnEgg/dfn: A white egg. [etc]/ol, as proposed by by Ian:


 ollifigurefigcaptionLorem Ipsum/figcaption
   Sit amet, consectetur adipiscing elit.
 /figure/li
 lifigurefigcaptionAliquam Viverra/figcaption
   Fringilla nulla nunc enim nibh, commodo
   sed cursus in./figure/li/ol

 Or, if one wishes, one could drop the olli…/li/ol completely
 and  instead e.g. do the following:

 stylefigure figure{display:list-item}/style/headbody
 figure
 figure
   figcaptionLorem Ipsum/figcaption
   Sit amet, consectetur adipiscing elit.
 /figure
 figure
   figcaptionAliquam Viverra/figcaption
   Fringilla nulla nunc enim nibh, commodo
   sed cursus in.
 /figure
 /figure


 They looks fancy. However, I have a feeling that a life cycle should be
 a definition list, and the above examples don't possess the meaning
 definition list. I'm not sure if I'm correct or not. Let me know if I'm
 not.


 Sincerely,
 Ian Yang


Sorry, after reconsideration, I think it's okay to use ol.

I was wrong to assume that all life cycles have definition term and
definition description pairs. After some googling, I found that some life
cycles have only terms and don't have descriptions.

So when there are only terms, it's okay to use:

ol
liEggli
liCaterpillarli
..
..
/ol

However, dfn examples I could found only use it in normal paragraphs. I'm
not sure if that's appropriate to put it in list items like
lidfnterm/dfn: blablabla/li. And besides, the unwanted colon can
causes styling inconveniences :-P

http://www.w3.org/wiki/HTML/Elements/dfn

http://reference.sitepoint.com/html/dfn


Sincerely,
Ian Yang


Re: [whatwg] Suggest making dt and dd valid in ol

2012-07-19 Thread Ian Yang
From previous discussions, some people had suggested possible markup for
life cycle type contents. And personally I will stick to using dl until
there is a better solution.

There is still one thing left unanswered. And that's whether we will be
able to put li inside dl.

Let's consider form we used often. When coding a form, none of us make it
like the following one because that's obviously very ugly and, most
importantly, it hurts our eyes!

form method=post action=/
label for=nameName/label
input id=name type=text
label for=emailEmail/label
input id=email type=email
label for=siteWebsite/label
input id=site type=url
label for=phonePhone/label
input id=phone type=tel
input id=male type=radio
label for=maleMale/label
input id=female type=radio
label for=femaleFemale/label
label for=msgMessage/label
textarea id=msg/textarea
/form

Instead, we use div (some people use p) to group sub elements to make
them more organized, and we also get the side benefit of having more
elements for styling:

form method=post action=/
div
label for=nameName/label
input id=name type=text
/div
div
label for=emailEmail/label
input id=email type=email
/div
div
label for=siteWebsite/label
input id=site type=url
/div
div
label for=phonePhone/label
input id=phone type=tel
/div
div
input id=male type=radio
label for=maleMale/label
/div
div
input id=female type=radio
label for=femaleFemale/label
/div
div
label for=msgMessage/label
textarea id=msg/textarea
/div
/form


Like above examples, the following dl is not well organized, and it's
also a pain to read it:

dl
dtLorem Ipsum/dt
ddSit amet, consectetur adipiscing elit./dd
dtAliquam Viverra/dt
ddFringilla nulla nunc enim nibh, commodo sed cursus in./dd
dtPretium Et Nibh/dt
ddQuisque porttitor mauris ut velit tincidunt ut hendrerit erat
mollis./dd
ddA dui condimentum suscipit. Quisque tortor nulla./dd
dtTempus Et Augue/dt
ddVivamus ipsum massa, tristique tempus lobortis a./dd
dtVivamus Semper Convallis/dt
dtCras Eget Eros/dt
ddPellentesque. Vestibulum volutpat mollis placerat./dd
ddMaecenas eu tempus ut, imperdiet eu tortor./dd
dtPellentesque/dt
ddLobortis consequat ipsum id pulvinar./dd
dtNibh Purus/dt
ddAdipiscing sit amet ultrices quis, consequat eu dolor./dd
/dl

If developers could, *optionally*, use li to wrap each group, the code
would be more organized:

dl
li
dtLorem Ipsum/dt
ddSit amet, consectetur adipiscing elit./dd
/li
li
dtAliquam Viverra/dt
ddFringilla nulla nunc enim nibh, commodo sed cursus in./dd
/li
li
dtPretium Et Nibh/dt
ddQuisque porttitor mauris ut velit tincidunt ut hendrerit erat
mollis./dd
ddA dui condimentum suscipit. Quisque tortor nulla./dd
/li
li
dtTempus Et Augue/dt
ddVivamus ipsum massa, tristique tempus lobortis a./dd
/li
li
dtVivamus Semper Convallis/dt
dtCras Eget Eros/dt
ddPellentesque. Vestibulum volutpat mollis placerat./dd
ddMaecenas eu tempus ut, imperdiet eu tortor./dd
/li
li
dtPellentesque/dt
ddLobortis consequat ipsum id pulvinar./dd
/li
li
dtNibh Purus/dt
ddAdipiscing sit amet ultrices quis, consequat eu dolor./dd
/li
/dl

And usually life cycle type contents are presented as circles. Without
li(s), it will be hard to style them.

Since the *optional *use of li in dl could solve many problems, may we
have li being valid in dl?


Sincerely,
Ian Yang


Re: [whatwg] Suggest making dt and dd valid in ol

2012-07-19 Thread Alex Bishop

On 19/07/2012 08:04, Ian Yang wrote:

Since the *optional *use of li in dl could solve many problems, may we
have li being valid in dl?


Probably not, as it has similar drawbacks as the proposed di element:

http://wiki.whatwg.org/wiki/FAQ#HTML_should_group_.3Cdt.3Es_and_.3Cdd.3Es_together_in_.3Cdi.3Es.21

Alex

--
Alex Bishop
alexbis...@gmail.com


Re: [whatwg] Suggest making dt and dd valid in ol

2012-07-19 Thread Ian Yang
On Fri, Jul 20, 2012 at 2:02 AM, Alex Bishop alexbis...@gmail.com wrote:

 On 19/07/2012 08:04, Ian Yang wrote:

 Since the *optional *use of li in dl could solve many problems, may we

 have li being valid in dl?


 Probably not, as it has similar drawbacks as the proposed di element:


 http://wiki.whatwg.org/wiki/FAQ#HTML_should_group_.3Cdt.3Es_and_.3Cdd.3Es_together_in_.3Cdi.3Es.21


Thanks. However, the drawbacks mentioned in that document is about the
nonexistent di, not the existent li.

li in dl is rendered without problems in IE6+, FF3.6+, Chrome, and
Safari. Only in Opera that definition term and the bullet aren't at the
same line.

Furthermore, browsers need to be compliant with the standards, not the
standers need to be compliant with browsers. If the latter were true, we
wouldn't have had so many new HTML5 elements to use.


Sincerely,
Ian Yang


Re: [whatwg] Suggest making dt and dd valid in ol

2012-07-19 Thread Sean Hogan

On 20/07/12 10:52 AM, Ian Yang wrote:

On Fri, Jul 20, 2012 at 2:02 AM, Alex Bishopalexbis...@gmail.com  wrote:


On 19/07/2012 08:04, Ian Yang wrote:


Since the *optional *use ofli  indl  could solve many problems, may we

haveli  being valid indl?


Probably not, as it has similar drawbacks as the proposeddi  element:


http://wiki.whatwg.org/wiki/FAQ#HTML_should_group_.3Cdt.3Es_and_.3Cdd.3Es_together_in_.3Cdi.3Es.21


Thanks. However, the drawbacks mentioned in that document is about the
nonexistentdi, not the existentli.


Yes, that whole section is misleading, as has been discussed before:

- The benefit of di or li is not just styling
- There's no indication that a CSS solution will be developed anyway
- As you say, none of those reasons apply to li


li  indl  is rendered without problems in IE6+, FF3.6+, Chrome, and
Safari. Only in Opera that definition term and the bullet aren't at the
same line.

Furthermore, browsers need to be compliant with the standards, not the
standers need to be compliant with browsers. If the latter were true, we
wouldn't have had so many new HTML5 elements to use.



Well, the browser vendors need to agree somewhat before the standard 
becomes a standard.
And at the moment there's lots of cool new stuff to implement, as well 
as many browser discrepancies and *real* bugs to fix, so I think it will 
be some time before anyone looks at this issue properly.


regards,
Sean




Re: [whatwg] Suggest making dt and dd valid in ol

2012-07-16 Thread Ian Yang
2012/7/16 Ian Hickson i...@hixie.ch

 On Sat, 14 Jul 2012, Ian Yang wrote:
  Recently I was involved in a project. One of its pages has a special
  content which is like a life cycle. There are several stages in the
  cycle, each stage has a term followed by some text describing the term.
  Let's take the life cycle of butterfly for example:
 
  Egg
  A white egg.
 
  Caterpillar
  The egg hatches into a caterpillar. The caterpillar eats and grows a
  tremendous amount.
 
  Pupa
  The caterpillar forms a hard outer shell. Inside the shell, the
 caterpillar
  changes into a butterfly.
 
  Butterfly
  Butterflies live for only a short time. They will fly, mate, and
 reproduce.
  The female lays an egg that was fertilized by the male.
 
  By seeing such contents, we usually code it using definition list
  (dl). At first, I was thinking the same idea. But then I realized that
  stages in a life cycle should be regarded as ordered contents. So
  ordered list (ol) would be more appropriate.

 ol and dl would both be fine here. I'd probably go with ol, because
 it's a list of states, each of which has a name, rather than a list of
 names, but both are reasonable.

 With ol, I'd probably write:

ol
 lidfnEgg/dfn: A white egg.
 lidfnCaterpillar/dfn: The egg hatches...

 ...and so on.


Thanks. That use looks fine, yet I'm a bit confused now. What's the
difference between *using definition list (dl)* and *using ordered list (
ol) with dfn inside of it*? And how could we determine when to use
which?


 If we could make dt and dd being not restricted to dl only, but
  could also exist in ol, the problem will be solved perfectly.

 It's not clear that there's a problem to be solved. :-)

 (Also, there are parsing issues that make changing this area of the spec
 be rather fraught with peril.)


Yeah, I had gave up that idea as it loses the meaning definition list.



On Sat, 14 Jul 2012, Ian Yang wrote:
 
  Thanks for the info about the spec saying in dl the order of the list

  of groups *may* be significant. However, what it says means a dl
  itself is unable to tell whether its contents are unordered or ordered,
  and we have to judge that by ourselves.

 Well, what it means is that a user agent can't randomly reorder a dl's
 contents, as that would violate the rule that its rendering must
 faithfully represent the page's semantics. (The spec relies on this in
 several places to mark up English-prose equivalents of switch statements
 in its algorithms, for example.)


  Comparing to ul and ol which themselves are able to tell whether
  their contents are unordered and ordered, the dl itself being unable
  to do that is, imho, disappointing.

 It's something we could add, but it's not clear that there's a compelling
 need for it. What is the use case for knowing that a dl's contents can
 be arbitrarily reordered?


Well, I'm not sure if user agent can't randomly reorder its contents
equals to the order of its content is important. If it does, some use
cases of dl such as FAQ may became incorrect as the order of contents of
FAQ is usually unimportant.


Sincerely,
Ian Yang


Re: [whatwg] Suggest making dt and dd valid in ol

2012-07-16 Thread Ian Yang
2012/7/16 Jukka K. Korpela jkorp...@cs.tut.fi

 2012-07-16 5:36, Ian Yang wrote:

 Imo, ul means the order of the items is unimportant, not browsers can
 render the items in any order.


 But if the order is unimportant, there still _is_ an order. Being
 unordered would be something else.


The order you are referring to here is just the sequence of writing li(s)
into the ul. That's not the actual meaning of the order of list items and
is unimportant.


And what would it matter to indicate the order as important if you only do
 that in markup, without affecting rendering, search engines, etc., at all?
 It's like invisible ink in a book. If it is somehow relevant to say that
 the order is unimportant, you have to, well, *say* it (in words).


Because as a coder, my main concern is whether the meaning of the code I
write is correct or not. If the order is unimportant, I write ul, and my
job is done. As for default browser rendering, search engines, etc ...
That's not my main concern.



 The only reason for this unordered list idea (a list is by definition
 unordered; a set, or a multiset, is not) is the willingness to keep ul
 and ol in HTML (it would be very impractical to omit one of them) without
 admitting that they were introduced, and are being used, simply for
 bulleted and numbered lists. So this resembles the confusing play with
 words regarding i and b.


At first, maybe they were introduced and misused by some people because of
their default renderings. They anyway possess meanings in their names. And
nowadays they are used by their meanings instead of their default rendering.

But your opinion does remind me of the small element. That element is a
perfect example of introducing and using an element simply for its
rendering. Unlike ul and ol, it's not meaningfully named at all.
Honestly, I'm not a huge fan of recycling a deprecated element. If we need
an element for side comments, we could introduce comment or c. If we
need an element for document info, we could introduce info. That would
make HTML elements more meaningfully named.


Sincerely,
Ian Yang


Re: [whatwg] Suggest making dt and dd valid in ol

2012-07-16 Thread Ian Hickson
On Mon, 16 Jul 2012, Jukka K. Korpela wrote:
 2012-07-16 5:36, Ian Yang wrote:
 
  Imo, ul means the order of the items is unimportant, not browsers 
  can render the items in any order.
 
 But if the order is unimportant, there still _is_ an order.

The specification even mentions that the order can be specific and 
intentional; e.g. alphabetical. The spec doesn't say that there is no 
order, merely that the order is not important.


 Being unordered would be something else.

Something essentially impossible in the linear medium that is digital 
content. :-)


 And what would it matter to indicate the order as important if you only 
 do that in markup, without affecting rendering, search engines, etc., at 
 all?

It can affect search engines. In particular, for example, Google will 
extract items from lists in Web pages and display them in the search 
engine results snippets. If the list's order is unimportant, it can 
reorder the items to give the most relevant ones first. If the order _is_ 
important, it might make more sense for it to only show the first few.


 The only reason for this unordered list idea (a list is by definition 
 unordered; a set, or a multiset, is not) is the willingness to keep ul 
 and ol in HTML (it would be very impractical to omit one of them) 
 without admitting that they were introduced, and are being used, simply 
 for bulleted and numbered lists. So this resembles the confusing play 
 with words regarding i and b.

No, these are quite different. The i and b that were introduced in the 
contemporary version of the spec have entirely different semantics as the 
obsolete ones from the HTML4 days. They were only introduced after strong 
use cases were presented, and they happen to use the same element names 
because that allows us to leverage existing implementations. In the case 
of ul and ol they were kept more or less as defined in HTML4 (though 
with better wording and examples). To be honest I don't think we ever 
really studied whether or not they should be included; given their broad 
use and relatively minimal negatives, there was no reason to.

-- 
Ian Hickson   U+1047E)\._.,--,'``.fL
http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


Re: [whatwg] Suggest making dt and dd valid in ol

2012-07-15 Thread Ian Yang
2012/7/15 Jukka K. Korpela jkorp...@cs.tut.fi

 2012-07-14 18:51, Ian Yang wrote:

  If ol is no more and no less ordered than ul,
 what's the purpose of its introduction?


 The real purposes, in the dawn of HTML, were that ol and ul correspond
 to numbered and bulleted lists, respectively, reflecting two very common
 concepts in word processors. This is how they have been used, though some
 authors have started overusing ul for thinks like lists of links even
 when they specifically don't want them to appear as bulleted. Even W3C
 specifications, in their markup, switch to ul in the midst of hierarchy
 when they want bullets and not numbers.

 HTML5 tries to stick to the theoretical idea of ordered vs. unordered
 list, but it does not really change anything, and it is not supposed to
 change anything - any ul will still be rendered in the order written.

 More on this:
 http://www.cs.tut.fi/~**jkorpela/html/ul-ol.htmlhttp://www.cs.tut.fi/%7Ejkorpela/html/ul-ol.html



Thanks. I'm not sure if I understand it correctly. I just couldn't find a
robust information from the article to proof that ol is no more and no
less ordered than ul.

Throughout the article, I saw it mentioned bullets and numbers
frequently. However, that's just browsers' default rendering of ul and
ol. As a coder, personally I don't care how browsers render them by
default. What I care is the meaning of the code I write. That is, when I
want an unordered list, I write ul; when I want an ordered list, I write
ol. ul means unordered list, and ol means ordered list. It's that
simple.

Although there may be some people misuse them (like the example mentioned
in the article), that's not ul and ol's problem.

If I missed anything, please let me know. Thanks again.


Sincerely,
Ian Yang


Re: [whatwg] Suggest making dt and dd valid in ol

2012-07-15 Thread Jukka K. Korpela

2012-07-15 17:40, Ian Yang wrote:

 Throughout the article, I saw it mentioned bullets and numbers
 frequently. However, that's just browsers' default rendering of ul and
 ol.

It's the only real difference between the two.

 As a coder, personally I don't care how browsers render them by
 default.

You should. Check out the Usual CSS Caveats.

 What I care is the meaning of the code I write. That is, when I
 want an unordered list, I write ul; when I want an ordered list, I 
write

 ol. ul means unordered list, and ol means ordered list.

And what does that mean? Does it mean that browser may or will treat 
ul as unordered in the sense that it can render the items in any 
order? If not, what *is* the difference? Just some people's *calling* it 
unordered.


Yucca



Re: [whatwg] Suggest making dt and dd valid in ol

2012-07-15 Thread Leif H Silli

Sat, 14 Jul 2012 23:53:32 +0800, from Ian Yang

Okay, it seems that one of the ideas I mentioned in my original email 
needs

to be revamped.


I was saying that using general heading (H1) and paragraph (p) loses
the meaning of definition term and definition description, but I didn't 


realize that using ol loses the meaning of definition list. That is,

the following code is, in fact, improper:


!-- The following code is improper as it loses the meaning of definition

list. --

ol
   li
   dt/dt
   dd/dd
   /li
   li
   dt/dt
   dd/dd
   /li
   li
   dt/dt
   dd/dd
   /li
/ol


An XOXO list should solve this:

http://microformats.org/wiki/xoxo#Properties_of_Outline_Items

Or just add a dl wrapper around the dt/dd elements in your code above.
--
Leif H Silli 


Re: [whatwg] Suggest making dt and dd valid in ol

2012-07-15 Thread Ian Yang
2012/7/16 Jukka K. Korpela jkorp...@cs.tut.fi

 2012-07-15 17:40, Ian Yang wrote:
  Throughout the article, I saw it mentioned bullets and numbers
  frequently. However, that's just browsers' default rendering of ul and
  ol.

 It's the only real difference between the two.


Sorry, I still don't get it. ul means unordered list; ol means ordered
list. They are quite different, aren't they?


  As a coder, personally I don't care how browsers render them by
  default.

 You should. Check out the Usual CSS Caveats.


Okay, actually I should say that browser's default rendering is not my *main
concern*.

I know browsers surely have their different default renderings of different
list elements to help readers distinguishing them. But as a coder, my *main
concern* is if the meaning of the code I write correspond the the content,
not the their default renderings (because browsers will handle that).

 What I care is the meaning of the code I write. That is, when I
  want an unordered list, I write ul; when I want an ordered list, I
 write
  ol. ul means unordered list, and ol means ordered list.

 And what does that mean? Does it mean that browser may or will treat ul
 as unordered in the sense that it can render the items in any order? If
 not, what *is* the difference? Just some people's *calling* it unordered.


Imo, ul means the order of the items is unimportant, not browsers can
render the items in any order.

If there were a browser which wants to render the items of ul in any
order, okay, it may do that. Anyway, that's not my main concern.


Sincerely,
Ian Yang


Re: [whatwg] Suggest making dt and dd valid in ol

2012-07-15 Thread Ian Yang
2012/7/16 Leif H Silli xn--mlform-...@xn--mlform-iua.no

 Sat, 14 Jul 2012 23:53:32 +0800, from Ian Yang

 Okay, it seems that one of the ideas I mentioned in my original email
 needs to be revamped.


 I was saying that using general heading (H1) and paragraph (p) loses
 the meaning of definition term and definition description, but I didn't
 realize that using ol loses the meaning of definition list. That is,
 the following code is, in fact, improper:


 !-- The following code is improper as it loses the meaning of
 definition list. --

 ol
li
dt/dt
dd/dd
/li
li
dt/dt
dd/dd
/li
li
dt/dt
dd/dd
/li
 /ol


 An XOXO list should solve this:

 http://microformats.org/wiki/**xoxo#Properties_of_Outline_**Itemshttp://microformats.org/wiki/xoxo#Properties_of_Outline_Items

 Or just add a dl wrapper around the dt/dd elements in your code above.


Thanks for the useful information. I didn't know the XOXO thing before.

However, after reading the examples they provided, I still couldn't
understand its use. Could you please provide me with an example of the use
of XOXO, using the life cycle of the butterfly I mentioned above? Thank you
very much.


Sincerely,
Ian Yang


Re: [whatwg] Suggest making dt and dd valid in ol

2012-07-15 Thread Ian Hickson
On Sat, 14 Jul 2012, Ian Yang wrote:
 
 Recently I was involved in a project. One of its pages has a special 
 content which is like a life cycle. There are several stages in the 
 cycle, each stage has a term followed by some text describing the term. 
 Let's take the life cycle of butterfly for example:
 
 Egg
 A white egg.
 
 Caterpillar
 The egg hatches into a caterpillar. The caterpillar eats and grows a
 tremendous amount.
 
 Pupa
 The caterpillar forms a hard outer shell. Inside the shell, the caterpillar
 changes into a butterfly.
 
 Butterfly
 Butterflies live for only a short time. They will fly, mate, and reproduce.
 The female lays an egg that was fertilized by the male.
 
 By seeing such contents, we usually code it using definition list 
 (dl). At first, I was thinking the same idea. But then I realized that 
 stages in a life cycle should be regarded as ordered contents. So 
 ordered list (ol) would be more appropriate.

ol and dl would both be fine here. I'd probably go with ol, because 
it's a list of states, each of which has a name, rather than a list of 
names, but both are reasonable.

With ol, I'd probably write:

   ol
lidfnEgg/dfn: A white egg.
lidfnCaterpillar/dfn: The egg hatches...

...and so on.


 If we could make dt and dd being not restricted to dl only, but 
 could also exist in ol, the problem will be solved perfectly.

It's not clear that there's a problem to be solved. :-)

(Also, there are parsing issues that make changing this area of the spec 
be rather fraught with peril.)


On Sat, 14 Jul 2012, Anne van Kesteren wrote:
 
 I would recommend not over-thinking the matter. Otherwise soon you will 
 start wrapping your ps in ol/lis too to ensure they stay in the 
 correct order.

True!


 Using dl for ordered groups is perfectly fine.
 
 (The specification points this out as well: The order of the list of 
 groups, and of the names and values within each group, may be 
 significant.)

Indeed.


On Sat, 14 Jul 2012, Jukka K. Korpela wrote:
 
 Indeed. The ol element is no more and no less ordered than ul or any 
 other element. Many HTML tag names are misleading.

It's certainly true that many element names are derived more from 
historical accidents than their current semantics, but ol and ul are 
semantically quite different, as the spec describes.

Specifically, ol implies that the order of the list cannot be changed 
without affecting the meaning of the page, whereas the order in a ul 
list is merely aesthetic.


  (The specification points this out as well: The order of the list of 
  groups, and of the names and values within each group, may be 
  significant.)
 
 That's actually a questionable statement there, since it may make the 
 [reader] ask whether the order of sub-elements is *generally* 
 significant.

That is a good question to ask oneself.


 It's as questionable as it would be to write The order of successive p 
 elements may be significant or The order of successive section 
 elements may be significant.

They indeed _are_ significant. The spec doesn't mention this, though, 
because it's blatently obvious and nobody in their right mind will 
question it. :-)

With dl, we do get people asking whether it's ok to have the order 
matter, so having an explicit statement in the spec allowing it is useful. 
(Witness this very thread for such an example.)


On Sat, 14 Jul 2012, Ian Yang wrote:
 
 So based on the ul and the ol, we could have unordered definition 
 list (udl) and ordered definition list (odl).

I don't really understand what problem this solves.


On Sat, 14 Jul 2012, Ian Yang wrote:
 2012/7/14 Jukka K. Korpela jkorp...@cs.tut.fi
  
  Indeed. The ol element is no more and no less ordered than ul or 
  any other element. Many HTML tag names are misleading.
 
 That's interesting. If ol is no more and no less ordered than ul, 
 what's the purpose of its introduction? Could you provide detailed 
 explanations or examples? Thanks.

Jukka is incorrect in his statement. The difference between ol and ul 
is specifically that the order of elements in ol matters and the order 
of elements in ul does not.

From the spec:

# The ol element represents a list of items, where the items have been 
# intentionally ordered, such that changing the order would change the 
# meaning of the document.

# The ul element represents a list of items, where the order of the items 
# is not important -- that is, where changing the order would not 
# materially change the meaning of the document.

There are examples in the two sections that illustrate the quite serious 
semantic difference between the two.


On Sat, 14 Jul 2012, Jukka K. Korpela wrote:
 
 The real purposes, in the dawn of HTML, were that ol and ul 
 correspond to numbered and bulleted lists, respectively, reflecting two 
 very common concepts in word processors. This is how they have been 
 used, though some authors have started overusing ul for thinks like 
 lists of links even when they specifically 

Re: [whatwg] Suggest making dt and dd valid in ol

2012-07-15 Thread Jukka K. Korpela

2012-07-16 5:36, Ian Yang wrote:


Imo, ul means the order of the items is unimportant, not browsers can
render the items in any order.


But if the order is unimportant, there still _is_ an order. Being 
unordered would be something else. And what would it matter to indicate 
the order as important if you only do that in markup, without affecting 
rendering, search engines, etc., at all? It's like invisible ink in a 
book. If it is somehow relevant to say that the order is unimportant, 
you have to, well, *say* it (in words).


The only reason for this unordered list idea (a list is by definition 
unordered; a set, or a multiset, is not) is the willingness to keep ul 
and ol in HTML (it would be very impractical to omit one of them) 
without admitting that they were introduced, and are being used, simply 
for bulleted and numbered lists. So this resembles the confusing play 
with words regarding i and b.


Yucca




Re: [whatwg] Suggest making dt and dd valid in ol

2012-07-14 Thread Jukka K. Korpela

2012-07-14 10:46, Anne van Kesteren wrote:


On Sat, Jul 14, 2012 at 6:22 AM, Ian Yang ian.h...@gmail.com wrote:

By seeing such contents, we usually code it using definition list (dl).
At first, I was thinking the same idea. But then I realized that stages in
a life cycle should be regarded as ordered contents.


I would recommend not over-thinking the matter. Otherwise soon you
will start wrapping your ps in ol/lis too to ensure they stay in
the correct order.


Indeed. The ol element is no more and no less ordered than ul or any 
other element. Many HTML tag names are misleading.



(The specification points this out as well: The order of the list of
groups, and of the names and values within each group, may be
significant.)


That's actually a questionable statement there, since it may make the 
read ask whether the order of sub-elements is *generally* significant. 
It's as questionable as it would be to write The order of successive p 
elements may be significant or The order of successive section 
elements may be significant.


Yucca




Re: [whatwg] Suggest making dt and dd valid in ol

2012-07-14 Thread Anne van Kesteren
On Sat, Jul 14, 2012 at 9:34 AM, Jukka K. Korpela jkorp...@cs.tut.fi wrote:
 2012-07-14 10:46, Anne van Kesteren wrote:
 (The specification points this out as well: The order of the list of
 groups, and of the names and values within each group, may be
 significant.)

 That's actually a questionable statement there, since it may make the read[er]
 ask whether the order of sub-elements is *generally* significant. It's as
 questionable as it would be to write The order of successive p elements may
 be significant or The order of successive section elements may be
 significant.

I believe it was added to the specification for the kind of question
that came up here. The why do we have ul and ol but not dl and
odl? question.


-- 
http://annevankesteren.nl/


Re: [whatwg] Suggest making dt and dd valid in ol

2012-07-14 Thread Ian Yang
2012/7/14 Anne van Kesteren ann...@annevk.nl

 I would recommend not over-thinking the matter. Otherwise soon you
 will start wrapping your ps in ol/lis too to ensure they stay in
 the correct order.


That wouldn't be the problem. General ps of an article never are list
contents, so we surely won't wrap them in ol/lis.


 Using dl for ordered groups is perfectly fine.

 (The specification points this out as well: The order of the list of
 groups, and of the names and values within each group, may be
 significant.)


Thanks for the info about the spec saying in dl the order of the list of
groups *may* be significant. However, what it says means a dl itself is
unable to tell whether its contents are unordered or ordered, and we have
to judge that by ourselves.

Comparing to ul and ol which themselves are able to tell whether their
contents are unordered and ordered, the dl itself being unable to do that
is, imho, disappointing.


Sincerely,
Ian Yang


Re: [whatwg] Suggest making dt and dd valid in ol

2012-07-14 Thread Ian Yang
2012/7/14 Jukka K. Korpela jkorp...@cs.tut.fi

 Indeed. The ol element is no more and no less ordered than ul or any
 other element. Many HTML tag names are misleading.


That's interesting. If ol is no more and no less ordered than ul,
what's the purpose of its introduction? Could you provide detailed
explanations or examples? Thanks.


Sincerely,
Ian Yang


Re: [whatwg] Suggest making dt and dd valid in ol

2012-07-14 Thread Ian Yang
Okay, it seems that one of the ideas I mentioned in my original email needs
to be revamped.

I was saying that using general heading (H1) and paragraph (p) loses
the meaning of definition term and definition description, but I didn't
realize that using ol loses the meaning of definition list. That is,
the following code is, in fact, improper:

!-- The following code is improper as it loses the meaning of definition
list. --
ol
li
dt/dt
dd/dd
/li
li
dt/dt
dd/dd
/li
li
dt/dt
dd/dd
/li
/ol


2012/7/14 Anne van Kesteren ann...@annevk.nl

 I believe it was added to the specification for the kind of question
 that came up here. The why do we have ul and ol but not dl and
 odl? question.


That's a good idea. Thank you :)



So based on the ul and the ol, we could have unordered definition list (
udl) and ordered definition list (odl).

When contents of a definition list are unordered, we could use:

udl
li
dt/dt
dd/dd
/li
li
 dt/dt
 dd/dd
 /li
li
 dt/dt
 dd/dd
 /li
/udl

And when contents of a definition list are ordered, we could use:

odl
li
dt/dt
dd/dd
/li
li
 dt/dt
 dd/dd
 /li
li
 dt/dt
 dd/dd
 /li
/odl


Sincerely,
Ian Yang


Re: [whatwg] Suggest making dt and dd valid in ol

2012-07-14 Thread Jukka K. Korpela

2012-07-14 18:51, Ian Yang wrote:


If ol is no more and no less ordered than ul,
what's the purpose of its introduction?


The real purposes, in the dawn of HTML, were that ol and ul 
correspond to numbered and bulleted lists, respectively, reflecting two 
very common concepts in word processors. This is how they have been 
used, though some authors have started overusing ul for thinks like 
lists of links even when they specifically don't want them to appear as 
bulleted. Even W3C specifications, in their markup, switch to ul in 
the midst of hierarchy when they want bullets and not numbers.


HTML5 tries to stick to the theoretical idea of ordered vs. 
unordered list, but it does not really change anything, and it is not 
supposed to change anything - any ul will still be rendered in the 
order written.


More on this:
http://www.cs.tut.fi/~jkorpela/html/ul-ol.html

Yucca