Closed
Bug 232995
Opened 21 years ago
Closed 21 years ago
can't invoke a client side image map AREA href via the keyboard
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
VERIFIED
DUPLICATE
of bug 214373
People
(Reporter: gibson.becky, Assigned: aaronlev)
Details
User-Agent:
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113
I have created a client side image map. Each AREA in the map is a rect and
contains an href that exectutes a javascript function on the page:
<AREA shape="rect" id="cyan" href="javascript:selectColor('cyan');" alt="Cyan"
coords="10,10,60,55" tabindex="100">
I can tab to each area and see that it gets focus but when I press enter with
focus on one of the AREAS nothing happens - my javasdcript function is not
invoked. Clicking on the area with the mouse DOES invoke the javascript
function. This used to work by pressing enter in Mozilla 1.3 (although there
were some focus issues) and 1.4. It broke in 1.5 and remains broken in 1.6.
Reproducible: Always
Steps to Reproduce:
1.create a test page with a client side image map that has several rectangular
AREA elements
2.assign an href="javascript:alert('something');" to each area
3.assign a tabindex to each area
4. load the test page with the image map, tab to the first area
5. when the area has focus, press enter
Actual Results:
nothing happens
Expected Results:
the alert('something') for the area with focus should have been executed. This
works properly if you click the mouse on the area and it worked with the
keyboard in Mozilla 1.3 and 1.4
I have a simple jpg and example html file that I can send that demonstrates this
problem. I searched bugzilla and I see that there are still a number of
keyboard accessibility issues. I didn't see this one mentioned and am concerned
because it is a regression. Here is the code of the simple HTML page (although
it doesn't do much good without the image):
<html>
<head><title>Testing Image Map</title>
<script language="JavaScript">
function selectColor(block) {
alert(block + " was selected");
}
</script>
</head>
<body>
<form>
Tab to a color block and press enter, or click on the block with the mouse.<br>
<img id="ColorMapImage" align="middle" src="fourColor.jpg" border="0"
usemap="#colors" style="position:relative">
<MAP name="colors" id="colorMap" >
<AREA shape="rect" id="cyan" href="javascript:alert('cyan');" alt="Cyan"
coords="10,10,60,55" tabindex="100">
<AREA shape="rect" id="magenta" href="javascript:alert('magenta');"
alt="Magenta" coords="75,10,125,55" tabindex="200">
<AREA shape="rect" id="yellow" href="javascript:alert('yellow');" alt="Yellow"
coords="135,10,185,55" tabindex="300">
<AREA shape="rect" id="black" href="javascript:alert('black');" alt="Black"
coords="195,10,245,55" tabindex="400">
</MAP>
</form>
</body>
</html>
Comment 1•21 years ago
|
||
*** This bug has been marked as a duplicate of 214373 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
Updated•6 years ago
|
Component: Keyboard: Navigation → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•