Anne van Kesteren

IE8: The Bad (Update)

In March I wrote a post titled IE8: The Bad, since then a new beta of Internet Explorer has been released. It still seems a bit dubious whether they are actually committing to standards. This could be a communication issue or actually intended. It is mostly unclear to me.

I should note I only played around with Internet Explorer 8 for an hour so I only discovered the most trivial interoperability issues. More extended testing would undoubtedly reveal more and I hope (independent) Web developers will try to verify what they are told.


  1. As I explained in Aaron’s post, getAttribute doesn’t really exist in IE prior to IE8 mode. There, getAttribute is only another notation of getting the property value, and you have to use the property name; other examples of this are e.g. div.getAttribute('className') and input.getAttribute('htmlFor'). You just don’t happen to notice this for most attributes because they don’t contain a dash.

    So the described behaviour is entirely consistent with previous versions of IE. This behaviour of getAttribute is a pretty fundamental flaw, and it seems understandable that the IE team did not want to risk backwards compatibility while still making ARIA available in quirks mode. I’m sure that had they not done that, there would have been complaints as well :).

    In pre-IE8, if you want to get attribute values by their real attribute name, you can use the following:

    function _getAttribute(oNode, sName) {
        if (oThis.browser_ie) {
            var oAttr = oNode.attributes[sName];
            return oAttr ? oAttr.nodeValue : '';
        return oNode.getAttribute(sName) || '';

    This should work for the ARIA-attributes as well.

    Posted by Laurens Holst at

  2. XML backend format? An excellent idea!

    localStorage["foo"] = "bar";

    <root><item name="foo" value="bar" ltime="3543985872" htime="29960568" /></root>

    localStorage["foo"] = "\uffff";

    <root><item name="foo" value=" /></root>


    Posted by Philip Taylor at

  3. Laurens, yeah, I think most people realize why it works the way it does. It just sucks a lot given that ARIA almost entirely consists of hyphenated attributes and Microsoft never gave feedback in the direction of that being a problem.

    Posted by Anne van Kesteren at

  4. Yes, it would have been better if they had done that :).

    @Philip Taylor: hmm, so MSXML uses U+FFFF as an end of string terminator? How odd.

    Posted by Laurens Holst at

  5. Laurens: No, they use U+0000 as a string terminator (or at least if you write a string containing U+0000 into localStorage then everything after it gets stripped off). U+FFFF is just an arbitrary choice from the characters not allowed in well-formed XML (along with U+FFFE, U+D800, U+0007, and loads of others).

    It looks their XML serialiser prints up to value="... and then aborts when it detects an invalid character, not getting around to printing the closing ", and then tries to close all the open elements before stopping, and then IE happily writes the broken output to disk and deletes the previous storage file and loses all your data.

    (But I haven't tested this in any detail, so I may be missing some subtleties.)

    Posted by Philip Taylor at

  6. So someone raised a bug with IE for this, right?

    Posted by Jeff at

  7. I did not submit any bugs. There is something you need to agree to which you cannot really do if you compete with Microsoft as I understood things. (Have not checked that though, but it scared me away.)

    Posted by Anne van Kesteren at

  8. Looks like they'll never learn. Instead of implementing existing standards, they invent their own... History repeating itself.

    Btw, IE8 is said to support CSS pseudo-elements such as :before and :after, however it adds an extra space before actually 'parsing' them... Which in most cases defeats the purpose.

    Posted by Mathias Bynens at

  9. Anne, read this: Search for Content-Type. Fun ! Instead of fixing their broken content sniffing which has caused headaches for all other spec compliant browsers, they add yet another proprietary http header to override their behavior.

    Posted by xErath at

  10. Do you really believe that ARIA only working in super standards mode is an issue? Since this is the default mode for IE8, this seems like a good thing. In effect, the people who are opting out of using well-defined web standards need to give them all up. This doesn't seem like all that bad of a thing to me.

    Posted by Nicholas C. Zakas at

  11. It also works in other modes, except that there it does in proprietary ways, which would create issues for other vendors. So yes, I think it is an issue.

    Posted by Anne van Kesteren at

  12. IE8b2 can not even understand a simple hover transition. And the missing content bug! They sure do know how to make IE really bad. Well done MS for keeping us developers amused.

    Posted by Alan Gresley at