Closed Bug 64250 Opened 25 years ago Closed 24 years ago

<font><a href><font>: link split before second <font> (was: Tabbing thru links, focus occasionally disappears)

Categories

(Core :: DOM: HTML Parser, defect)

x86
All
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla1.0.1

People

(Reporter: aaronlev, Assigned: aaronlev)

References

()

Details

(Keywords: access, top100)

Attachments

(6 files)

On Google, press tab 5 times. 1st tab: moves to "Google Search" button 2nd tab: moves to "I'm feeling Lunchy" button 3rd tab: moves to "Advanced Search" link 4th tab: moves to "Preferences" link 5th tab: focus is gone! One more tab it goes where you thought it would for tab #5
undoubtly this is a dup of another more specific bug, but I'll need to investigate to find out which one.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9
Attached file testcase
According to javascript:alert(document.body.innerHTML), Mozilla is splitting the link before the inner <font>. The two parts of the link then take up two slots in the tab order for the page. -> Parser (should I reassign to the parser people?)
Component: Keyboard Navigation → Parser
Keywords: top100
Summary: Tabbing thru links, focus occasionally disappears → <font><a href><font>: link split before second <font> (was: Tabbing thru links, focus occasionally disappears)
Another page that seems to have the same problem: http://www.cs.princeton.edu/~appel/modern/java/ <font color="#006000">Modern Compiler Implementation <a href="../c">in C</font></a><br> <h3><a name=software>Software</a></h3> <ul> <li><a href="http://java.sun.com/products/JDK/">Java (tm) Developers Kit</a> <li><a href="JLex"><strong>JLex</strong> lexical analyzer generator</a> <li><a href="CUP"><strong>CUP</strong> parser generator</a> All the links after the first one from this fragment seem to have the url of the fragment. Seems to be caused by by the badly nested <font> and <a> tags. probably should get a 4xp keyword as this is not a problem in ie or ns4.
1010mozilla@Ostermiller.com, can you file that as a separate bug (but cross- reference the two bugs)? The testcase for this bug is valid HTML 3.2. You're right, though, it is 4xp.
Keywords: 4xp
Item that I reported with badly balanced <font> <a> tags has been filed as bug 64536.
This one looks closely related to (top100, mostfreq) bug 64622
This bug still occurs in Mozilla 2001-01-16-04 WinNT Eng after bug 64622 was fixed. In the Google example it does select the link for http://directory.google.com after the 5th tab (press enter to verify this), but it does not mark the focus. It seems to split the URL into two parts. The HTML that is failing is this: <a href="http://directory.google.com"> <font color=#006600><b>Google Web Directory</b></font></a> The extra space seems to be the problem. Strangely, in the www.cs.princeton.edu example, I can't tab to the bottom two links. I can tab down to the one that starts with SPIM and then no more. The SPIM link spans two lines, so that might be the problem....
I should have looked at the bug summary... more analysis shows that this bug is caused by the code: <font size=-1><a href="http://directory.google.com"> <font color=#006600><b>Google Web Directory</b></font></a></font>. I'll attach a testcase. Each new font tag inside the font and anchor tags generates another link.
QA Contact: sairuh → janc
Yeah, this is a parser bug since the tabbing code will just view this as multiple links (as it should given that is the DOM model that it is fed)
Assignee: saari → rickg
Status: ASSIGNED → NEW
I don't think that patch will fix the first testcase (although it probably will fix Google). That patch might also have negative effects if there's any other reason a focusable object had zero width.
What does that first testcase have to do with the original bug? Testcase #1 doesn't show a bug with the focus disappearing, which was what this bug orginally was. On my system testcase #1 shows a different bug - one link being treated as two. Also, what negative effects? When a frame has 0 width, it has no content and is thus invisible on the screen. It shouldn't be focusable with the keyboard then. How would a user know it was even there, or had focus? From a practical view, I can think of no cases where a content-less link should get focus by keyboarding to it.
Hmmm ... I definitely think there was a mistake here of having 2 different bugs filed together. Bug #1 - focus disappearing when it goes to contentless focusable node Bug #2 - links being split in certain situations
aaron's patch #3 looks good to me, FWIW. /be
>Bug #1 - focus disappearing when it goes to contentless focusable node >Bug #2 - links being split in certain situations (parser problems) I think this bug is really about #2. That's what's happening on Google and on each of the testcases. #1 also happens on Google *because* of #2, but so do plenty of other problems that have nothing to do with focus (drbrain's links panel probably shows the link twice, a program that reads the page out loud and indicates links would get confused, etc.) Please file another bug for skipping over zero-width nodes when focusing. This bug has already been cross-referenced with other bugs as the parser problem, so changing it to the workaround for Google would cause confusion. (I still think the workaround sounds risky, btw. Is width==0 really the same as "contentless"?)
A width of zero really isn't the same thing as contentless. But tabbing to it would definitely produce what looked like a lost tab press to the user. I don't know what the right thing is here, if we should tab to logically invisible content or not. Aaron, you're probably the best person to make that call, since it is sort of an accessibility thing. Anyone know what IE does? If you stick with this check, you should ad a check for zero height as well.
updated qa contact.
QA Contact: janc → bsharma
Are you still shooting for 0.9 on this? If so please email drivers@mozilla.org with a status on you progress. If not please retarget against a later Milestone. Thanks.
Assignee: rickg → aaronl
It turns out this is an HTML parsing bug, It sounds like people don't want my fix that uses zero-width frame check to see if a frame is worth tabbing to. This bug should be assigned to someone who knows about parsing.
Target Milestone: mozilla0.9 → mozilla1.0.1
aaronl, please clear Target Milestone and reassign -- don't abuse mozilla1.0.1 yet (it's less meaningful than Future, but you don't really mean Future here, you just need to reassign to harishd). /be
Worksforme (it appears to be fixed) in the 2nd testcase with 2001042504 WinNT. Perhaps some parser problem was fixed?
This bug appears to have been fixed.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → WORKSFORME
Verified on build: 2001-05-03-04 Platform: WinNT In first testcase (attachment) after I press the tab 3nd time the focus is lost for couple of keystrokes of tab key and then come back at the text box. In second testcase (attahment) same thing happens.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
When I take the first testcase, and turn the "bcd" into a normal link with no font changes, I get the same behavior. Therefore, I think that's a general navigation/tabbing problem, not anything to do with this bug.
Any extra tabs here have nothing to do with font changes. See attachment.
Status: REOPENED → RESOLVED
Closed: 24 years ago24 years ago
Resolution: --- → FIXED
Verified on 2001-08-20-Trunk on WinNt On google.com, the focus is not lost after clicking tab 5 times. The attached test case also loads fine.
Status: RESOLVED → VERIFIED
Verified on 2001-08-20-Trunk on WinNt On google.com, the focus is not lost after clicking tab 5 times. The attached test case also loads fine.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: