[OpenLayers-Dev] "Action element" design choice

Tim Schaub tschaub at openplans.org
Tue Feb 26 12:32:15 EST 2008


Hey-

Christopher Schmidt wrote:
> On Tue, Feb 26, 2008 at 08:52:10AM +0100, Nils Weinander wrote:
>> Hello developers
>>
>> "Action elements", like the PanZoom pan arrows and zoom +/- or
>> Controls in a Panel are represented by an <img> inside a <div>.
>>
>> Our graphic designer would like to have an <a href> rather
>> than just an <img>, in order to se a title attribute (for
>> mouseover tool tips) and to make the elements reachable
>> without a mouse, by tabbing.
>>
>> What is the rationale for the design choice?
>>
>> Modifying the code to get an <a href> and make it possible
>> to set its title looks non-trivial as the creation of the
>> actual HTML elements is of course rather deep down. We
>> don't want to start doing it without some discussion of
>> the implications.
> 
> You can set title + alt on image tags to get teh same effect in both
> browsers, where a small tooltip is displayed when hovering over an
> element. 
> 
> I'm +0 on modifying the buttons to be anchors in addition to images, if
> it's done in such a way that it doesn't change the current behavior.

Yeah, see if you can get the effect you want by setting title/alt 
attributes.  In general, I'm I'm -0 on changing to anchors, since href 
gets followed whenever there is an error in the onclick code (not that 
big a deal here, just an annoyance, even for #).

Tim

> 
> Regards,




More information about the Dev mailing list