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

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."

-- 
Michael[tm] Smith
http://people.w3.org/mike/+

Received on Friday, 12 August 2011 14:05:10 UTC