[whatwg] The new content model for <details> breaks rendering in MSIE5-7

Ian Hickson ian at hixie.ch
Tue Oct 13 20:41:02 PDT 2009


On Tue, 29 Sep 2009, Keryx Web wrote:
> 2009-09-29 19:10, Dean Edwards skrev:
> > 
> > There is a nasty side effect though. As you mentioned the 
> > document.write() should be the last thing in the <head>. If there are 
> > any scripts following the document.write() then they are *not 
> > executed*. I consider this a serious drawback. With server software 
> > generating script elements all over the place there are bound to be 
> > problems with this technique. It would be nice to find a better 
> > solution.
> 
> I consider this a deal breaker. Fragile and unintuitive hacks, that 
> really no one knows or can explain why they work, is NOT the kind of 
> things we should rely on when pushing for HTML5.

On Tue, 29 Sep 2009, Dean Edwards wrote:
> 
> You have two choices to get around the <dd> rendering bug:
> 
> 1. The potentially dangerous document.write()
> 
> 2. Inserting weird conditional comments into your code:
> 
>     </head>
>      <!--[if lt IE 8]><object><!<![endif]-->
>     <body>
> 
> I don't like either solution.

On Tue, 29 Sep 2009, Tab Atkins Jr. wrote:
> 
> The third solution, of course, is just to avoid <details> until IE7 
> shrinks sufficiently to be ignored.  That won't take too much longer, 
> and then you can start using it with impunity (aided by a js shim to 
> give it functionality in the browsers that accept it but don't implement 
> it yet).
> 
> This whole thing is really much less of an issue than the <legend> 
> problems were, where you'd have to wait for *every* current browser to 
> phase out, as opposed to just two that are already declining nicely.
> 
> After all, we're already happy enough using <div>s or <dl>s or whatever 
> to implement that functionality.  It would be nice to immediately start 
> using the new stuff, but the timeline for when it's viable isn't so long 
> as to be unworkable.  In the meantime, we just keep doing what we're 
> already doing.

Indeed.


On Tue, 29 Sep 2009, Dean Edwards wrote:
> 
> It's going to take a while for IE7 to go away. In the meantime it 
> becomes an education issue -- "You can start using HTML5 except 
> <details> which will look OK in some browsers but completely break 
> others."

...and except for <canvas> which will be slow or not work in IE for the 
forseeable future, and the drag and drop model's "draggable" attribute 
which will only work in new browsers, or the new controls which will look 
like text fields in legacy UAs, or... how is <details> different?


> Can't we just invent some new elements? We've already created 20 new 
> ones. Two more won't hurt. :)

We have more than a dozen elements whose names would be appropriate here. 
Inventing entirely new elements to do the same thing again just to work 
around a very short-term problem is just silly.


On Sat, 3 Oct 2009, Dean Edwards wrote:
> 
> That's the whole point of this thread. We are specifying something that 
> won't be usable for years. Let's make the spec better so that we can use 
> <details> sooner.

Just spell it <div> and don't worry about it for now.

I really don't understand the sudden urgency here. All the browsers 
support this in their current versions to the same extent that they 
support, say, <section>; the only problem is obsolete browsers. If this is 
the biggest problem that you're worried about in terms of HTML5 
deployment, then my job here is done.


On Sat, 3 Oct 2009, Tab Atkins Jr. wrote:
> 
> If we mint a new element, we pay the costs of adding yet another 
> vaguely-heading element to add to the dozen+ we already have in the 
> language, and what's the benefit?  IE6 and IE7 will require a less 
> invasive hack to get them to the same level of not-working that all the 
> other browsers have.

Indeed.


On Sat, 3 Oct 2009, Keryx Web wrote:
> 
> The IE6/7 problem is not the only one. A number of people, myself 
> included, have expressed dissatisfaction from a semantic and 
> teachability viewpoint.
> 
> It is not better to let dt/dd have three (or perhaps 2) different 
> meanings, and different syntactic rules depending upon the parent 
> element than it would be to have 2 more elements.

I'd really like to use <caption>, but that's a lost cause.

I would prefer to use <legend>, but people had even more short-term 
troubles with that than with <dt>/<dd>.

If we're willing to wait, then I think the right solution is to drop 
<details> and <figure> for now and add them in later again with <legend>.

But apparently there is so much demand that waiting a few more years isn't 
an option.


On Sun, 4 Oct 2009, Keryx Web wrote:
> 
> First and foremost, in <dl> the order is all important. Here it would 
> not matter.
> 
> In <dl> one may have several <dd> for each <dt> (or several <dt>'s in a 
> row), here one may not.
> 
> You call this "minor", I say confusing. But we have in fact created a 
> new syntax - why is that better than creating new elements?

It's less bad, in that it reduces the number of elements being have to 
consider when trying to remember how you mark up the legend/caption of a 
<details> element.

I agree that an element like <caption> or <legend> would be better.


> I am arguing in favor of introducing a new element, which would be the 
> zero cost solution, since <details> is new anyway.

New elements are not zero cost.


On Sun, 4 Oct 2009, Tab Atkins Jr. wrote:
> 
> It's not a zero-cost solution, though.  It introduces *another* nearly 
> identical heading-type element to the language, joining the ranks of the 
> dozen+ we already have.  Trying to remember what heading-type element to 
> use in <details> as opposed to in <fieldset> or what-have-you is a 
> learning nightmare of a different variety.

Indeed. In addition it is more "bloat" in browsers -- every element means 
a new interface mapping, potentially more parsing code, etc.


On Sun, 4 Oct 2009, Dean Edwards wrote:
> 
> MSIE5-7 usage is currently between 25% and 30%. It will take a number of 
> years before it becomes insignificant.

HTML5's impact should be viewed on the timescale of decades. A few years 
is nothing.


As far as I can see the options are as follows:

 1. Drop support for <details> and <figure> for now, revisit it later.

 2. Use <legend>, and don't expect to be able to use it in any browsers 
    sanely for a few years.

 3. Use <dt>/<dd>, and don't expect to be able to use it in old versions 
    of IE without rather complicated and elaborate hacks for a few years.

 4. Invent a new element with a weird name (since all the good names are 
    taken already), and don't expect to be able to use it in IE without 
    hacks for a few years.

I am not convinced of the wisdom of #4. I prefer #2 long term, but I see 
the argument for #3.

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


More information about the whatwg mailing list