W3C home > Mailing lists > Public > www-validator@w3.org > October 2005

Re: Error Message Feedback

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Sun, 30 Oct 2005 10:10:01 +0200 (EET)
To: Naturally Naomi <naturallynaomi@yahoo.com>
Cc: www-validator@w3.org
Message-ID: <Pine.GSO.4.63.0510300948280.138@korppi.cs.tut.fi>
On Sat, 29 Oct 2005, Naturally Naomi wrote:

> Validating [Hello,
> I tried to add the <MAP> element to my page
>(as described on 
> http://www.w3.org/TR/WCAG10-HTML-TECHS/#group-bypass), which returned an 
> error in HTML 4.0.1. Strict. What can I do to make the below code HTML 
> 4.0.1 Strict, or should I switch to HTML 4.0.1 Transitional?

You probably mean HTML 4.01.

> "<MAP title="Navigation Bar">
> <ul>
>  <li><a accesskey="1" href="index.html">Home</a></li>
>  <li><a accesskey="2" href="episodes.html">Episodes</a></li>
>  <li><a accesskey="3" href="about.html">About
> Us</a></li>
>  <li><a accesskey="4" href="news.html">News</a></li>
>  <li><a accesskey="5" href="testers.html">Testers</a></li>
>  <li><a accesskey="6" href="support.html">Support</a></li>
>  <li><a accesskey="7" href="webbuilding.html">Website
> building</a></li>
>  <li><a accesskey="8" href="forum.html">Forum</a></li>
> </ul>
> </MAP>”,

There are many different problems involved. First, what you are doing
to follow certain WCAG 1.0 guidelines on accessibility is an exercise
in futility or worse. Wrapping the list inside a <map> element helps
no one in practice, and using accesskey attributes tends to hurt rather
than help (that's at least the current view of most accessibility
experts) - it may break the functionality of _browser_ shortcuts.

On the technical side, you didn't post the URL of your document. The URL 
is relevant even if you have guessed right where the problem is, and 
people often haven't. In particular, when you post a snippet of code
(markup), E-mail programs may distort the data. In this case,
one of the problems is probably a no-break space, and who knows
what happens to it in E-mail? (It reached me, but I don't know about

Among the problems that the validator reports, if we construct a minimal
test document around the <map> element is that the element lacks a 
required NAME attribute. Adding name="" would do, since the <map>
markup has no effect anyway - so you might just as well remove
the <map ...> and </map> tags. If you keep the <map> element for
some reason, then you need to wrap it inside a block level container
such as <div> in order to satisfy Strict rules.

The strangest problem, however, is caused by no-break spaces (U+00A0)
inside the <ul> element, at the start of lines, before the <li> tags.
You have indented the <li> elements by using one space and one
no-break space.

I created a trivial test document
that has a <ul> element with one <li> element inside it but
with a no-break space before the <li> tag. Here's what the
W3C validator says:

1. Error Line 5 column 0: start tag for "LI" omitted, but its declaration 
does not permit this.

There's something very strange in the report's source.

The WDG validator reports:

Line 5, character 1:
^Error: start tag for LI omitted

This makes more sense.

The problem with the no-break space is that it is not defined
as a whitespace character. Instead, it is treated as a data character,
so inside a <ul>, it is forbidden except when it appears inside
a <li> element. The validators seem to imply a missing <li> before
the no-break space, which doesn't quite hit the nail in this case.

Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
Received on Sunday, 30 October 2005 08:10:07 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 November 2015 11:01:26 UTC