[whatwg] Navigation Lists — A different use for <MENU>, and two errors

Nicholas Shanks contact at nickshanks.com
Mon Mar 19 09:09:56 PDT 2007

Given XHTML 2.0's idea of an element for navigation list (using <nl>  
as the tag [1]), it occurred to me that <menu>, deprecated in HTML 4  
but resurrected in HTML 5, would be entirely suitable for this  
purpose and fully backwards compatible. From what I can gather, this  
was the intended purpose of the element in the first place (not  
mimicking of OS menus/toolbars). It was little-used probably though  
lack of awareness.

I suggest that a new type, "navigation", be available for the menu  
element. It's default rendering would be unchanged from HTML 4  
(essentially, the type would be a no-op) but used to explicitly  
declare destination-oriented rather than an action-orientated menus.  
This would be in addition to rather than instead of the <nav>  
element, who's behaviour in HTML4 UAs is that of <div> rather than  
<ul>. (And be backwards-compatible, something <nav> isn't!)

<menu type="popup">  <!-- not a popup menu, actually declaring  
contextual menu items -->
	<li>Bold and Italic
<menu type="toolbar">  <!-- button-like behaviour -->
<nav><menu type="navigation">  <!-- contains some links -->
	<li><a href="bold">Typeface weights</a>
	<li><a href="italic">Cursive writing</a>

In particular, it seems pertinent for accessibility. For example,  
this survey seems to highlight that blind users cannot easily  
distinguish between menus and submenus:
(I highly recommend reading that article !)

Allowing header elements within the menu content model would  
alleviate this. Currently the "label" attribute is used for this  
purpose, which has all the failings of an attribute discussed at  
length in other threads, but most importantly does not get seen by  
users with screen readers!

I also think that the "popup" type should be renamed "contextual".  
What is known as a pop-up menu is created by using the <select> element.

Further, I am concerned about the backwards-compatibility of menus  
inside menus. The current spec says that if the submenu contains no  
label, it should render in line with the previous items. This  
contradicts HTML ² 4 which says that menus inside menus should act  
the same as ULs inside ULs. (i.e. indent; create a submenu).

[1]: http://www.w3.org/TR/xhtml2/mod-list.html#edef_list_nl

- Nicholas.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2157 bytes
Desc: not available
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20070319/2172f4c9/attachment-0001.bin>

More information about the whatwg mailing list