WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: error with MAP

for

From: Kynn Bartlett
Date: Jan 25, 2002 1:25PM


At 12:21 PM -0800 1/25/02, Glenda Watson Hyatt wrote:
>I'm using MAP for a navigation bar, as suggested by one of the web
>accessibility sites.
>
>Here is my code:
><!-- Navigation Bar -->
><MAP title="Navigation Bar">
><P CLASS="navbar">[<a href="toc.htm">Contents</a>] [<a
>href="question1.htm">Question 1</a>] [<a href="question3.htm">Question
>3</a>] [<a href="glossary.htm">Glossary</a>]</p>
></map>
>However, I get this error when validating the code:
><MAP title="Navigation Bar">
>Error: required attribute "NAME" not specified
>Where did I go wrong? Should title be NAME?
>
>This is rather urgent as the Simplified Web Accessibility Guide goes to
>print today. Help.

The NAME attribute is roughly equivalent to the ID attribute, not the
TITLE attribute. ID and NAME are both computer-readable tokens used
for hypertext links and the like. TITLE is a human-readable optional
label.

NAME is used in the IMG tag when you're making an imagemap, to tell
the browser which MAP to use. You probably want something
like:

<map title="Navigation Bar" name="navbar">

I personally am doubtful of the utility of using imagemap code to
mark up navigation bars, myself, but it probably isn't harmful.

--Kynn

--
Kynn Bartlett < <EMAIL REMOVED> > http://kynn.com
Chief Technologist, Idyll Mountain http://idyllmtn.com
Web Accessibility Expert-for-hire http://kynn.com/resume
January Web Accessibility eCourse http://kynn.com/+d201
Forthcoming: Teach Yourself CSS in 24 Hours


---
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/