On Mon, 6 Aug 2007, Andrew Fedoniouk wrote: > > > > > > Pay attention on "Third option - submenu". It contains additional > > > markup and/or styling. > > > > Assuming you mean for the boldened letters to represent the > > accelerator key, the idea is that you don't have to give them at all, > > the user agent will determine the optimal accelerators. > > That was just an example. > > I mean that either you allow all menu items to have arbitrary markup or > all of them should have plain text only model (so be an <option>).
All the menu item labels are pure text. See the definitions in the section on how commands are defined ("3.18.5. Commands"). Any included markup gets flatted out and is really only allowed for fallback purposes. > In real UI there are cases when menu even contains input elements: > http://terrainformatica.com/htmlayout/images/css-menus.png - so may have > arbitrary markup. The current spec supports checkbox and radio button menu items; further types are quite rare and I don't think we should support them in this version of the specification. (We can always extend the specification at some later time.) (The only GUI I am aware of that condones text fields in a menu would be the graphical RiscOS shell, and the other UI concepts shown in that screenshot are extremely rare and we could probably get away with never supporting them.) > Menu items even can be organized as a table (<td role=menu-item>) : > http://www.terrainformatica.com/htmlayout/images/popupdemo.png IMHO that's a separate widget, not a context menu. I would expect such a UI to be built using XBL or a new widget in a future version of HTML. > > > How you would achieve this with the @label? > > > > You don't need to bolden the letters, so it all Just Works. > > Sorry but I am not so optimistic. You cannot build optimal shortcut > system deducing only captions. Think about cut/copy/paste/select-all > menu items written in different languages. I'm just talking about the menu item mnemonics, not the shortcut keys. The shortcut keys are part of the bigger accesskey problem for which we don't even have the start of a solution yet. Whatever solution we find for accesskey will just be folded into the command and menu features. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'