Image maps in CSS (was Re: Ideas for CSS 3.0?)

On Thursday 2003-06-05 01:36 +0200, Daniel Steinberger wrote:
> >Things that are clickable should be in the primary content, not in 
> >styling.
> 
> I think so, too. At last because of accessibility-issues. I can access 

When I think of expressing something like imagemaps using CSS, I would
imagine that what we'd want would be something that would allow markup
like this:

<div id="statelinks">
  <a href="al/" id="state_al">Alabama</a>
  <a href="ak/" id="state_ak">Alaska</a>
  ...
  <a href="wi/" id="state_wi">Wisconsin</a>
  <a href="wy/" id="state_wy">Wyoming</a>
</div>

to be presented as an image map.

The style might look something like this:

#statelinks {
    content: image-map-url(us_map.png), contents;
}

#state_al {
    image-map-region: rect(400px, 200px, 420px, 250px);
}

#state_ak {
    image-map-region: polygon(5px 295px, 20px 275px, 50px 275px, ...);
}

etc

where image-map-url() was similar to url(), except it implied that
descendants with 'image-map-region' not equal to 'none' would be links
in the image map.

This is something I came up with in a few minutes, and I don't think
it's a particularly good proposal.  But it is an idea of what I'd expect
imagemaps-in-CSS to look like.

The point, however, isn't the proposal itself, but that I don't think
this would have the accessibility problems you mention.

-David

-- 
L. David Baron                                <URL: http://dbaron.org/ >

Received on Wednesday, 4 June 2003 20:00:25 UTC