W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > July to September 2002

RE: creating a menu

From: Charles McCathieNevile <charles@w3.org>
Date: Tue, 23 Jul 2002 11:46:57 -0400 (EDT)
To: Jukka Korpela <jukka.korpela@tieke.fi>
cc: <w3c-wai-ig@w3.org>
Message-ID: <Pine.LNX.4.30.0207231128310.27750-100000@tux.w3.org>

On Tue, 23 Jul 2002, Jukka Korpela wrote:

>But is it a definition for "cheese" if I list down some types of cheese? In
>theory, it would be an incomplete definition by enumeration - and a very
>unsatisfactory definition even in principle, not to mention practice. Cheese
>types don't form a closed set.

Right. It is, in fact, the definition of cheese links available on this page,
according to the types of cheese.

>> In addition you are linking to
>> them. Since this is a collection of links, I would use the
>> map element to contain them.
>In principle, you're right on the grounds that a map element is logically a
>collection of links, so it conveys the structure better than the use of
>_separate_ markup for a list (or other collection) and the links. And in
>principle, it would work well in no-images mode too, thanks to alt

Aah, I actually meant containing the dl in a map element - something like

<map name="foo">
  <h3>Cheese links</h3>
  <!-- the name is there because it might be useful - this
       example doesn't use it for anything -->
    <dt>Hard Cheese</dt>
    <dd><a href="mil">Milawa Capre</a></dd>
    <dd><a href="mor">Early Morning</a></dd>
    <dt>Soft Cheese</dt>
    <dd><a href="cam">Local Soggy</a></dd>
    <dd><a href="mum">Imported Squidgy</a></dd>
<!-- of course you don't have to use a dl and an h3 - choose appropriate
     elements for the group of links -->

This is a legal HTML 4 and XHTML fragment in all flavours of those languages.
The HTML 4 specification (from 1997) for map introduced the idea that you
could use this markup with shape and coords attributes added to the links so
they could work as imagemap links as well. This works fine in iCab, and in
non-graphic browsers like lynx, but I haven't tested it in any other browser
claiming HTML 4 compliance. (I just checked - it does work in Mozilla 0.9.7
so I suspect it works in new Netscape and Mozilla browsers).

I agree with you about the problems with using area elements to help older
browsers. One of the changes made between HTML 4.0 and HTML 4.01 was to allow
for area elements to be included along with "block content" (roughly
speaking, text elements) in an HTML 4.01 map element. This means it is valid
using HTML 4.01 or XHTML to include area elements when you have an image, for
backward compatibility.

A test page for this is provided by iCab - http://www.icab.de/test.html

What Lynx does is recognise that this is a map, or group of links - so it is
easy to skip over it without having a seperate "skip this group" link. If you
choose not to skip you find out exactly which links are in the group. It is a
nice way of implementing it.



>On the practical side, there are several accessility and usability problems
>with the map element, mainly due to the poor quality of implementations on
>visual browsers. The problems are so serious that map elements should
>normally be used only when accompanied with an equivalent set of (textual)
>links. In addition to the problems in making the alt texts available to
>people using visual browsers, see
>there are problems like
>- the "content in attribute" set of problems: the alt text is limited to
>plain text, so you cannot use text-level markup in the "link" texts
>- no way of giving _preference_ to the textual alternatives
>- lack of distinction between "unvisited" and "visited" "links"
>- assumably several indexing robots not traversing the "links".
>The conclusion is that menus should be primarily written as lists (or
>perhaps sometimes tables) of links. Using client-side image maps to
>_duplicate_ the menu could be useful in many cases though, when the images
>really _add_ something to the functionality; and images of cheese types
>could do that. Sometimes the added functionality could be crucial to
>accessibility, e.g. for users who easily recognize the images but do not
>know the words. After all, even Emmenthal cheese isn't universally known as
>"Emmenthal"! (Even then, there's the option of still using just a list of
>links, so that each link consists of some text and some image, in some order
>and positioning.)

Charles McCathieNevile    http://www.w3.org/People/Charles  phone: +61 409 134 136
W3C Web Accessibility Initiative     http://www.w3.org/WAI  fax: +33 4 92 38 78 22
Location: 21 Mitchell street FOOTSCRAY Vic 3011, Australia
(or W3C INRIA, Route des Lucioles, BP 93, 06902 Sophia Antipolis Cedex, France)
Received on Tuesday, 23 July 2002 11:46:59 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:36:10 UTC