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

Michael[tm] Smith, Fri, 12 Aug 2011 23:05:09 +0900:
> Antonio Zamora <antonio_zamora@verizon.net>, 2011-08-11 18:45 -0400:

> 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

Perhaps Antonio were looking for a way to connect alt text *without* a 
link? Why does HTML5 not permit this?

HTML4, in contrast, *permit* that an <area> element can have @alt text 
even if it does not act as a link. HTML4 justifies this by juxtaposing 
<area nohref alt="text" /> with <a>text</a>:

]]
   The first anchor specifies
   a small circular region with no associated link. The second anchor
   specifies a larger circular region with the same center coordinates.
   Combined, the two form a ring whose center is inactive and whose rim
   is active. The order of the anchor definitions is important, since 
the
   smaller circle must override the larger circle.
<MAP name="map1">
<P>
<A shape="circle" coords="100,200,50">I'm inactive.</A>
<A href="outer-ring-link.html" shape="circle" coords="100,200,250">I'm 
active.<
/A>
</MAP>

   Similarly, the nohref attribute for the AREA element declares that
   geometric region has no associated link.
[[

I believe HTML5 should be changed back to the way it works in HTML4. 
This would be fully in tune with the way HTML5 aligns <area> with <a>. 
E.g. about <a> without @href, HTML5 says that it "represents a 
placeholder for where a link might otherwise have been placed, if it 
had been relevant".

The obvious usecase for <area> with @alt but without @href is to add a 
description to a section of the image, but wihout adding a link.  HTML4 
had this feature. But HTML5 does not have it.
-- 
Leif H Silli

Received on Thursday, 18 August 2011 01:42:58 UTC