Bug 48341 - [testcase] last tabindex="-1" for a link or button in an HTML document is ignored
Summary: [testcase] last tabindex="-1" for a link or button in an HTML document is ign...
Status: RESOLVED LATER
Alias: None
Product: konqueror
Classification: Applications
Component: khtml forms (show other bugs)
Version: 3.5
Platform: RedHat Enterprise Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-27 03:15 UTC by Maksim Orlovich
Modified: 2008-04-21 10:16 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
testcase (794 bytes, text/html)
2003-06-14 03:48 UTC, Kai Lahmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Brownlee 2002-09-27 03:15:54 UTC
Version:           kdeaddons-konqueror-3.0.3-0.7.i386.rpm (using KDE KDE 3.0.3)
Installed from:    RedHat RPMs
OS:          Linux

Setting tabindex to -1 should remove the element from the tab cycle.  Apparently this doesn't work for the last element with tabindex set to -1.  Here is a test case:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
  <title>tabindex.html</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="GENERATOR" content="Quanta Plus">
</head>
<body>
     <a href="http://bogus.com/link1.html" tabindex="3">link1</a><br>
     <a href="http://bogus.com/link2.html" tabindex="2">link2</a><br>
     <a href="http://bogus.com/link3.html" tabindex="1">link3</a><br>
     <a href="http://bogus.com/link4.html" tabindex="-1">link4</a><br>
     <form action="script.php" method="POST">
     <input type="submit" value="submit1" tabindex="6"><br>
     <input type="submit" value="submit2" tabindex="5"><br>
     <input type="submit" value="submit3" tabindex="4"><br>
     <input type="submit" value="submit4" tabindex="-1"><br>
     </form>
</body>
</html>

When I tab through the HTML above, the "link4" anchor gets skipped (as it should), but the "submit4" button does not (the bug).  If I remove all the submit buttons, "link4" does NOT get skipped (the bug again).
Comment 1 Kai Lahmann 2003-06-14 03:48:20 UTC
Created attachment 1794 [details]
testcase

confirmed with testcase.
Comment 2 Maksim Orlovich 2004-05-24 18:50:05 UTC
What makes you think that setting it to -1 should behave that way? http://www.w3.org/TR/REC-html40/interact/forms.html#adef-tabindex does not specify it. 
Comment 3 Stephan Kulow 2004-05-25 09:26:47 UTC
Replaced osaru_online@hotmail.com with maksim@kde.org due to bounces by reporter
Comment 4 Maksim Orlovich 2004-05-25 17:12:33 UTC
Kai, can you answer #2, since the original reporter has went to /dev/null? The best I can think of is that -1 should be treated as 0/no property (right now it gets truncated to 32767)
Comment 5 Kai Lahmann 2004-05-25 17:22:08 UTC
well, there is no definition for that '-1'... So the bug is other way around: we ignore the 'link4', which should be reached after the elements with a valid tabindex.
Comment 6 Stephan Kulow 2004-10-28 23:09:55 UTC
hmm, the tab index is taken twice
Comment 7 George Goldberg 2007-12-18 07:09:44 UTC
Is this bug still present in a recent version of KDE, such as 3.5.8 or KDE 4.0 RC 2?
Comment 8 A. Spehr 2008-01-24 05:37:29 UTC
Can confirm for 3.5.8.
fredrikh confirms for 4.
Comment 9 George Goldberg 2008-04-06 03:31:42 UTC
This appears to be fixed on svn trunk r793457.
Comment 10 Michael Leupold 2008-04-09 11:55:07 UTC
Still present in 3.5.9, fixed in trunk r793457.
Comment 11 Michael Leupold 2008-04-09 12:37:21 UTC
reopening as still present in 3.5.9.
Comment 12 Michael Leupold 2008-04-21 10:16:26 UTC
Qualifies for backporting to the 3.x branch.