3.14.13. The area element

http://dev.w3.org/html5/spec/Overview.html#the-area

I have read this with much interest, and have few comments on the
@href, @alt and @shape attributes.

area without @href
This is defined as a "dead area" but I think it is useful, similar to
"a placeholder for where a link might otherwise have been placed". I'd
like these two concepts treated in a consistent fashion, and I prefer
the approach described for "placeholder links".

A simple use case: using <area> to mark a point or region on a map
(defined by the @alt value) - there may not always be a relevant link
(perhaps this is a semantic change to the meaning of "image maps").
Mandating the link is likely to lead to oddities such as self
referencing links or linking to the map fragment itself (using
#<map-id>).

area/@alt (continuing from above, when there is no @href)
"However, 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."

I challenge the assertion "cannot be selected". This is a reflection
of current UAs if anything, not a necessity of the HTML language. I
see three options:
1. Do nothing (spec remains tainted by UA behaviour).
2. Change the statement into an instruction for UAs. That is, we
require UAs to implement this behaviour. I would change the "cannot"
into a "must not" for a start, then edit for grammar.
3. Instruct UAs to make these elements able to be selected (i.e. make
them accessible). Define how this is to be accomplished.

I vote for making area accessible (regardless of @href). This may
relate to work done by ARIA or similar initiatives? It also is a
better fit to me. The @href attribute can be manipulated through the
DOM, it's better to have the element always accessible rather than
have accessibility being toggled. Naturally you can't "activate" (if
that is the right term) an area without @href.

As I said at the beginning, I think this is very similar to
"placeholder links" and I'd like similar treatment.


area/@shape
http://dev.w3.org/html5/spec/Overview.html#shape

Why poly/rect and not polygon/rectange? I think it would be better to
support real words rather than abbreviations. It's bad enough that
HTML is defined in US english without bringing arbitrary abbreviations
into the mix. UAs could easily parse this value on the first 4
characters.

It is somewhat confusing untangling the meaning of shape="default"
(entire image map) vs the "missing value default" (assumes "rect"). I
suggest the wording of this section be carefully reviewed. I suggest
this sentence include an explanation of the "default" shape, like so:
"In the default state state, area elements must not have a coords
attribute. The 'default' shape exactly matches the entire image map."

Maybe the table (used for all enumerated attributes?) could be
designed to include the "missing value default" in there.


Curiosities with @shape="default"

What does this mean?
<a href="img.html"><img usemap="foo" ... alt="Image" /></a>
<map id="foo">
<area shape="default" alt="Map" href="map.html" />
...
</map>

Which @alt and @href apply?

Received on Wednesday, 5 September 2007 11:02:43 UTC