W3C home > Mailing lists > Public > www-validator@w3.org > February 2014

Re: <menuitem> content model

From: Andry Rendy <master.skywalker.88@gmail.com>
Date: Wed, 12 Feb 2014 19:39:12 +0100
Message-ID: <CAGxST9k-ENYd8GwY6=6DJWfML+ztG_Rca+osuwe4jAeujEcarQ@mail.gmail.com>
To: "Michael[tm] Smith" <mike@w3.org>
Cc: David Dorward <david@dorward.me.uk>, "www-validator@w3.org" <www-validator@w3.org>
>As far as the current validator behavior goes, the underlying problem is
>that the HTML parser used by the validator doesn't yet treat <menuitem> as
>void. We need to first change the parser to treat it as such.

Wait, it's not only a problem with the Validator parser. User agents parse
subsequent <menuitem>s as nested in previous ones. I know that the model is
that and it's correct without the end tag but what are authors supposed to
do in order to serve <menu>s to legacy UAs maybe with a bit of a JS
polyfill in the future?


2014-02-12 18:00 GMT+01:00 Michael[tm] Smith <mike@w3.org>:

> David Dorward <david@dorward.me.uk>, 2014-02-10 21:57 +0000:
>
> > On 10 Feb 2014, at 21:34, Andry Rendy wrote:
> >
> > >>Where does it say that you may omit the end tag?
>
> The end tag for <menuitem> actually must be omitted. It's now defined as a
> void element, so it's a parse error for it to have an end tag.
>
> > >The original WHATWG draft mentions it.
> > >
> http://www.whatwg.org/specs/web-apps/current-work/multipage/interactive-elements.html#the-menuitem-element
> >
> > I suspect Nu is keyed off the W3C specification, not the WHATWG one.
>
> The W3C spec also says that <menuitem> is void -
>
>   http://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements
>
> As far as the current validator behavior goes, the underlying problem is
> that the HTML parser used by the validator doesn't yet treat <menuitem> as
> void. We need to first change the parser to treat it as such.
>
>   --Mike
>
> --
> Michael[tm] Smith http://people.w3.org/mike
>
Received on Wednesday, 12 February 2014 18:39:41 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:59:40 UTC