Tuesday, 26 January 2010

sIFR and tabbing in IE7

Recently, we noticed a strange problem in Internet Explorer when tabbing through pages where SIFR is used.

Internet Explorer appeared to include <object> tags in the list of tags it would focus on, including the <object> tags injected into the page via SIFR. However, the behaviour it had when tabbing onto <object> tags was erratic.

Sometimes it would happily leave focus on the <object>, but without any indication that the <object> was focused. Sometimes it would immediately throw focus onto the next focusable tag. Sometimes it would throw focus back to the beginning of the document, or to the browser toolbar itself, never to return to the HTML page. (The issue may be described in a comment on the SIFR site: http://novemberborn.net/sifr3/r372#c001075)

We weren’t able to isolate exactly what was going on, but we did find that using the attribute tabindex="-1"on the <object> tag prevented IE from focusing on it at all, which for simple SIFR headings is fine. We tweaked the sifr.js file to add the tabindex attribute (thankfully, an easy tweak).

This hasn't been checked on how this works when SIFR is used for links yet though: guess this would prevent tabbing to SIFR links in IE, so might need to adapt the fix if that crops up.

No comments:

Post a Comment