Bug 31496

Summary: floated links aren't selected when tabbing (tab-through links on a page)
Product: WebKit Reporter: Nachum Kanovsky <nachumk>
Component: FormsAssignee: chris fleizach <cfleizach>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: ahmad.saleem792, ap, bill.dane.stuff, cfleizach, dpranke, mijordan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows XP   
URL: http://nkcorner.com/chrome.php
See Also: https://bugs.webkit.org/show_bug.cgi?id=270713

Nachum Kanovsky
Reported 2009-11-13 14:56:35 PST
(I believe Webkit in use is 532.0, but I don't see that as an option) I am using Chrome Version 3.0.195.33 and tested this originally on http://nkcorner.com/about.php and http://nkcorner.com/chrome.php (reduced version). Firefox 3.5 and IE 8 work fine (although FF doesn't properly highlight floated links). Reproduce: Place cursor in location bar and start hitting tab button to tab-through available links on page. Expected: It should highlight all links one by one on the page. (On about.php it should highlight the 6 available links on the page before returning to location box.) What happens: It highlights only the non-floated links. (On about.php it highlights only the top right link and the resume link and skips the image and menu links) Reduced code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en-US"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8559-1"> </head> <body> <a href="chrome.php"><div style="float:left">float</div></a> <br> <a href="chrome.php">non-float</a> </body> </html> Link to bug filed with Chrome: http://code.google.com/p/chromium/issues/detail?id=27587
Attachments
Dirk Pranke
Comment 1 2009-12-22 18:05:00 PST
Hi Nachum, I'm sorry I haven't gotten to this yet. I haven't forgotten about you ...
Dirk Pranke
Comment 2 2009-12-22 18:44:17 PST
I can confirm that this still happens w/ Chrome 4 and with Safari 4 (both Safari/Win and Safari/Mac). Note that Opera is broken as well, so it looks like the whole area is fairly un-portable. I'm not sure how much of this is handled by WebKit vs the surrounding browser code, but I'll find out and figure out how this needs to be handled ...
Nachum Kanovsky
Comment 3 2009-12-22 18:57:47 PST
Thanks for looking into this, and let me know if there's anything I can do to help.
Nachum Kanovsky
Comment 4 2010-03-05 16:47:15 PST
Has there been any progress with this bug? I see it still happens in the newest Chrome available (5.0.342.2 dev)
Dirk Pranke
Comment 5 2010-08-24 21:40:27 PDT
okay, lord knows when I might get around to looking at this. Sorry, Nachum :( I'm reassigning the owner in the hopes that someone else will actually look at it. Hopefully I'll find the time to get to this once I clear the other stuff on my plate.
Bill Dane
Comment 6 2013-03-08 05:51:01 PST
Can we get this going again. This is huge for Section 508 of the Americans with Disabilities Act!! I have many many web-based courses developed for DHS and now I'm discovering that the navigational links in my interface are being skipped because they have CSS that floats them? NOT GOOD!
chris fleizach
Comment 7 2013-03-09 22:05:30 PST
looks like this happens because you're sticking a block element inside the <a> element. the <a> gets a zero sized bounding box and fails the check in bool HTMLAnchorElement::isKeyboardFocusable(KeyboardEvent* event) const return hasNonEmptyBoundingBox(); this could be fixed by doing <a style="float:left" href="chrome.php">float</a> instead of sticking a <div> inside.
chris fleizach
Comment 8 2013-03-09 22:06:05 PST
still it should be fixed...
Michael Jordan
Comment 9 2017-09-11 09:29:10 PDT
This bug has been open for years, and is particularly difficult to debug because the behavior is different from other browsers for all intents and purposes undocumented.
Ahmad Saleem
Comment 10 2024-03-12 05:33:30 PDT
Test case from Comment 0 - https://jsfiddle.net/b058spv4/ Steps to Reproduce: 1) Open above URL 2) Focus on Result 3) Press Tab key Expected: float should get focus ring Actual: float does not get focus ring ____ I am working on test to test it but can fix it by removing `hasNonEmptyBox` from HTMLAnchorElement.cpp, I tried it in bug 270713 but based on feedback on PR, it is better to do separately. So documenting the details here.
Ahmad Saleem
Comment 11 2024-04-06 00:04:59 PDT
This works in STP191 (as long as `Tabs to Links` is enabled). So I think we can mark this as 'RESOLVED CONFIGURATION CHANGED'. It got fixed via bug 270713. https://github.com/WebKit/WebKit/commit/e39892e12f8d3c3a544327c87c9904401e15ef9f
Note You need to log in before you can comment on or make changes to this bug.