W3C home > Mailing lists > Public > www-validator@w3.org > August 2011

Re: href within <area> is supposed to be optional

From: Philip TAYLOR (Webmaster, Ret'd) <P.Taylor@Rhul.Ac.Uk>
Date: Fri, 12 Aug 2011 15:13:17 +0100
Message-ID: <4E4534FD.1000506@Rhul.Ac.Uk>
To: "Michael[tm] Smith" <mike@w3.org>
CC: Antonio Zamora <antonio_zamora@verizon.net>, www-validator@w3.org

Michael[tm] Smith wrote:
> Antonio Zamora <antonio_zamora@verizon.net>, 2011-08-11 18:45 -0400:
>> The HTML validator gives the following error for an <area> element which has
>> no href=
>> Validation Output: 1 Error
>>    Error Line 93, Column 23: Element area is missing required attribute
>> href.
> The only circumstance in which the validator would emit that message is
> when the area element also has an alt attribute, in which case the error
> message is correct, because the spec doesn't allow alt to be specified on
> area elements unless the href attribute is also specified.
>   http://dev.w3.org/html5/spec/the-map-element.html#attr-area-alt
>   "If the area element has an href attribute, then the area element
>    represents a hyperlink. In this case, the alt attribute must be
>    present... If the area element has no href attribute, then the area
>    represented by the element cannot be selected, and the alt attribute
>    must be omitted."

Surely, from the very text that you have cited (and from your own
paraphrase of it), the omission of an "href" attribute from an <area>
element should generate an error message of the form "Element area has
disallowed attribute alt" rather than the message that it currently emits.
The error is not the omission of the "href", it is the inclusion of the "alt".

Philip Taylor
Received on Friday, 12 August 2011 14:13:45 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:18:04 UTC