Is there a workaround to Safari's/Opera's bug that you can't tab through hyperlinks?

Posted by scunliffe on Stack Overflow See other posts from Stack Overflow or by scunliffe
Published on 2010-02-18T20:36:08Z Indexed on 2010/03/25 1:43 UTC
Read the original article Hit count: 413

In IE, Firefox, Chrome and most Windows-based interfaces that I've used, the Tab key can be used to navigate from one form field or hyperlink to the next (e.g. "actionable" items) (note: I have not tested on other Operating Systems)

However Safari and Opera skip all hyperlinks in a web page when tabbing. IMHO its a usability bug but I digress.

Is there a workaround/hack to make Safari and/or Opera navigate through these links?

I've noticed that Opera will accept the tabindex attribute if set e.g. tabindex="0" thus maintaining the links "index" within the flow of the DOM on the page... but Safari does not want to accept this.

For those interested, this bit of jQuery will make all the hyperlinks clickable.

//Make links 'tab-able' in Opera
$(document).ready(function(){
  if($.browser.opera){
    $('a[href]').attr('tabindex', 0);
  }
});

...and although this seems to work for Opera... is there a better workaround?

© Stack Overflow or respective owner

Related posts about keyboard-navigation

Related posts about safari