[whatwg] menuitem: Issue reported by the web developers

2014-11-25 Thread Sanjoy Pal
Hello Friends,

 

We have implemented contextmenu attribute in blink as per the specification.

There is an issue reported by the web developers.

 

As per specification [1][2], menuitem should not have end tag, but few
websites uses menuitemSome markup/menuitem which resulted in broken
sites[3][4].

Firefox allows  menuitemSome markup/menuitem. So, we are wondering if
specification can be modified to allow menuitemSome markup/menuitem for
backward compatibility.

 

Please provide your guidance on the same.

 

 

[1] https://html.spec.whatwg.org/multipage/forms.html#the-menuitem-element
https://html.spec.whatwg.org/multipage/forms.html#the-menuitem-element

[2] https://html.spec.whatwg.org/multipage/syntax.html#void-elements
https://html.spec.whatwg.org/multipage/syntax.html#void-elements

[3]https://crbug.com/412945

[4]https://crbug.com/434240

 

 

Thanks and regards,

Sanjoy Pal

 



Re: [whatwg] menuitem: Issue reported by the web developers

2014-11-25 Thread Ian Hickson
On Wed, 26 Nov 2014, Sanjoy Pal wrote:
 
 As per specification [1][2], menuitem should not have end tag, but few 
 websites uses menuitemSome markup/menuitem which resulted in broken 
 sites[3][4].
 
 Firefox allows menuitemSome markup/menuitem. So, we are wondering if 
 specification can be modified to allow menuitemSome markup/menuitem 
 for backward compatibility.

Do we know how many sites are affected?

As I see it there's basically three choices -- in my order of preference, 
they would be:

- break the sites: if there aren't many, and especially if they can be 
evangelised to avoid these mistakes, then we should just do that

- rename menuitem to something else, like command: this would be 
unfortunate, since the feedback from Mozilla a few years ago was that 
they'd rather have menuitem than command, and it would also mean some 
parser churn, which is always bad, but it would probably be reasonably 
safe to do if we can find a good replacement element name

- change menuitem's semantics so that the label comes from the element's 
textContents instead of a label= attribute (and charge the parser 
accordingly): not sure how compatible this would be; it has numerous 
disadvantages, too, like making people think they can put markup in the 
element (look at the Apple page for an example), which wouldn't work

There may be other options that aren't immediately coming to mind.

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