On Dec 2, 2009, at 12:58 AM, Hugh Guiney wrote:


On Tue, Dec 1, 2009 at 9:58 PM, Maciej Stachowiak <m...@apple.com> wrote:
It's not just rendering issues - all current browsers produce a broken DOM when you include <legend> outside of <fieldset>, ranging from dropping the <legend> element entirely to creating a fieldset to doing the IE thing of adding void elements named "legend" and "/legend" (but without the usual
script workaround.

Is this issue being addressed by the latest DOM specification? It
seems there should really be a standard behavior for browsers when
encountering unknown or unexpected elements that ensures that the next
version of HTML is not similarly encumbered by this.

HTML5 parsing requirements will fix this both for <legend> and for unknown elements.

For what it's worth, all non-IE browsers handle unknown elements in a consistent way, and IE can be made to do so by first creating an instance of said element in script. <legend> is not a new element though, it has a longstanding use in <fieldset> many of it's particular oddities stem from the fact that browsers have only expected it to appear inside <fieldset>, where it has specialized rendering.

Regards,
Maciej

Reply via email to