WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: jQuery: link focus lost in FF 3.5.5 when following link and hitting backspace key

for

Number of posts in this thread: 5 (In chronological order)

From: Loremy
Date: Wed, Nov 11 2009 3:00PM
Subject: jQuery: link focus lost in FF 3.5.5 when following link and hitting backspace key
No previous message | Next message →

Hello, I'm a web designer and web user interested in accessibility
matters and I hope I can learn and contribute here in some way or other.

Here's my first question:

I'm using Firefox 3.5.5 on Vista 32 Home Premium SP2 and only recently
noticed that -- with javascript/jQuery enabled -- link focus is lost
when you tab through a page, follow the link to another page and then
hit the backspace key to come back. Tab navigation continues at top of
page, not with the next link after the one in focus before.
No problems in this respect with IE8 and Opera.

Try it for yourself, e.g. with the "Plugins" link in the menu on
http://jquery.com/ -- once with js enabled (link focus is lost when you
come back after having followed the link to "Plugins", and once
with js disabled (link focus is still there after hitting the backspace
key.)

I can't believe it's just me...
Can anybody with Firefox (please mention version number and platform)
confirm or deny, please?

It's even more irksome in my particular case, since I have just
implemented a stylesheet switcher in order to enhance certain
accessibility aspects, but ironically this particular bug leads to a
loss of accessibility...

Does anybody know what might be the reason (version 1.3.2.min related?,
cookies related?, etc.) for this and how to solve it?

Loremy

From: Al Sparber
Date: Wed, Nov 11 2009 3:40PM
Subject: Re: jQuery: link focus lost in FF 3.5.5 when following linkand hitting backspace key
← Previous message | Next message →

From: "Loremy" < = EMAIL ADDRESS REMOVED = >

> Hello, I'm a web designer and web user interested in accessibility
> matters and I hope I can learn and contribute here in some way or other.
>
> Here's my first question:
>
> I'm using Firefox 3.5.5 on Vista 32 Home Premium SP2 and only recently
> noticed that -- with javascript/jQuery enabled -- link focus is lost
> when you tab through a page, follow the link to another page and then
> hit the backspace key to come back. Tab navigation continues at top of
> page, not with the next link after the one in focus before.
> No problems in this respect with IE8 and Opera.
>
> Try it for yourself, e.g. with the "Plugins" link in the menu on
> http://jquery.com/ -- once with js enabled (link focus is lost when you
> come back after having followed the link to "Plugins", and once
> with js disabled (link focus is still there after hitting the backspace
> key.)

The problem is actually present in all modern browsers except IE8. Go to
jQuery's forum and see if there is a fix. Here's what I think is happening
since it does work fine in IE8 and it also works right in Firefox with
script disabled...

Mozilla and Safari/Chrome (KHTML) are notorious (at least among scripters)
for taking rendering shortcuts in order to give the illusion of being a
faster browser. This often wreaks havoc with advanced scripts and authors
sometimes program workarounds. I know we do. Check your jQuery scripts for
any unload functions or calls.

--
Al Sparber - PVII
http://www.projectseven.com
Dreamweaver Menus | Galleries | Widgets
http://www.projectseven.com/go/apm
An Accessible & Elegant Accordion

From: Loremy
Date: Wed, Nov 11 2009 4:45PM
Subject: Re: jQuery: link focus lost in FF 3.5.5 when followinglinkand hitting backspace key
← Previous message | Next message →

Update first:
Seems I have pinned down the problem to the jQuery version...
I have just tested with several older versions (1.3.min, 1.2.6.min, and
1.2.min, and it works with the latter!
With jquery-1.2.min.js enabled, link focus is still there after coming
back!
We'll see if the developers can provide help...


Hi Al,

Thanks for your answer!

I see the same is happening on your website (interesting products --
didn't know them so far), e.g.
at http://www.projectseven.com/products/index.htm.

With js disabled, I tab to the "Extensions" link in the top menu, follow
the link and, after hitting the backspace key, still have the link focus
on "Extensions".
However, with js enabled, link focus on "Extensions" is lost when I get
back.

With jQuery and Firefox being so widespread nowadays, this really seems
to be a serious accessibility bug to me. I guess I'll have to
register at jQuery's forum to ask the developers.

> The problem is actually present in all modern browsers except IE8.

When testing, I didn't notice this problem with Opera 9.5.1 (haven't
installed the latest version yet), nor with IE7 (IE Tester) and, as I
said, with my native IE8.

BTW, I found one exception, where jQuery version 1.1.3.1 is enabled and
focus doesn't get lost on page change, so maybe it really has something
to do with the combination of Firefox and the latest version of jQuery.
Maybe the developers can give us help in this respect.

Thanks again,

Loremy


> The problem is actually present in all modern browsers except IE8. Go
> to
> jQuery's forum and see if there is a fix. Here's what I think is
> happening
> since it does work fine in IE8 and it also works right in Firefox with
> script disabled...
>
> Mozilla and Safari/Chrome (KHTML) are notorious (at least among
> scripters)
> for taking rendering shortcuts in order to give the illusion of being
> a
> faster browser. This often wreaks havoc with advanced scripts and
> authors
> sometimes program workarounds. I know we do. Check your jQuery scripts
> for
> any unload functions or calls.
>
> --
> Al Sparber - PVII
> http://www.projectseven.com

From: Al Sparber
Date: Wed, Nov 11 2009 5:35PM
Subject: Re: jQuery: link focus lost in FF 3.5.5 whenfollowinglinkand hitting backspace key
← Previous message | Next message →

From: "Loremy" < = EMAIL ADDRESS REMOVED = >
> Update first:
> Seems I have pinned down the problem to the jQuery version...
> I have just tested with several older versions (1.3.min, 1.2.6.min, and
> 1.2.min, and it works with the latter!
> With jquery-1.2.min.js enabled, link focus is still there after coming
> back!
> We'll see if the developers can provide help...
>
>
> Hi Al,
>
> Thanks for your answer!
>
> I see the same is happening on your website (interesting products --
> didn't know them so far), e.g.
> at http://www.projectseven.com/products/index.htm.
>
> With js disabled, I tab to the "Extensions" link in the top menu, follow
> the link and, after hitting the backspace key, still have the link focus
> on "Extensions".
> However, with js enabled, link focus on "Extensions" is lost when I get
> back.
>
> With jQuery and Firefox being so widespread nowadays, this really seems
> to be a serious accessibility bug to me. I guess I'll have to
> register at jQuery's forum to ask the developers.
>
>> The problem is actually present in all modern browsers except IE8.
>
> When testing, I didn't notice this problem with Opera 9.5.1 (haven't
> installed the latest version yet), nor with IE7 (IE Tester) and, as I
> said, with my native IE8.
>
> BTW, I found one exception, where jQuery version 1.1.3.1 is enabled and
> focus doesn't get lost on page change, so maybe it really has something
> to do with the combination of Firefox and the latest version of jQuery.
> Maybe the developers can give us help in this respect.

You're welcome. In our site, it's due to this little script:
//Fix Firefox backButton Stupidity
if(window.addEventListener){window.addEventListener("unload",P7_FFfix,false);}
function P7_FFfix(){return;}

Unfortunately, the bug is a Firefox (and Safari/Chrome) one so our choice is
to rewrite our scripts or work around their deficiencies. If we do nothing,
then our scripts will not works correctly, which is probably worse -
especially in our line of business. We thought we'd give them a few "dot"
releases to fix it but they have not yet. I think you'll find most major
sites, including Adobe.com and Yahoo.com to have this "issue".

I would also consider contacting Mozilla as well.

--
Al Sparber - PVII
http://www.projectseven.com
Dreamweaver Menus | Galleries | Widgets
http://www.projectseven.com/go/apm
An Accessible & Elegant Accordion

From: Loremy
Date: Fri, Nov 13 2009 7:45AM
Subject: Re: jQuery: link focus lost in FF 3.5.5 when following linkand hitting backspace key
← Previous message | No next message

> Seems I have pinned down the problem to the jQuery version...
> I have just tested with several older versions (1.3.min, 1.2.6.min,
> and
> 1.2.min, and it works with the latter!
> With jquery-1.2.min.js enabled, link focus is still there after coming
> back!

> We'll see if the developers can provide help...

Update:

I got back the following answer, and it makes perfect sense:

"Digging around it looks like we added our window unload event unbinding
logic in 1.2.2 - and I bet that that's what was causing the problems. We
actually fixed this in the latest nightlies (only unbind in IE) so this
problem should be resolved in the upcoming 1.4 release."

Great news for everybody keen on keeping focus...

Loremy