Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 tabbable.

//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?

like image 290
scunliffe Avatar asked Feb 18 '10 20:02

scunliffe


People also ask

How do I force a new tab to open?

Open a new tab Or, use a keyboard shortcut: Windows & Linux: Ctrl + t. Mac: ⌘ + t.

How do I open a new tab in Safari?

Open a new tab In the Safari app on your Mac, click the New Tab button in the toolbar (or use the Touch Bar). To change the page that opens in new tabs, choose Safari > Preferences, click General, click the “New tabs open with” pop-up menu, then choose an option. See Change General preferences.


1 Answers

In Safari, it's not a bug, it's an optional feature. On the Mac, tab selects objects other than links, Option+Tab select all objects. You can swap the behavior of these shortcuts in Preferences->Advanced. Then tab will behave like in other browsers.

On Windows, Option+Tab is not available. By default tab selects objects other than links , but there is an option in Preferences->Advanced that makes tab select all objects. Then tab will behave like in other browsers.

You should probably not try to interfere with this, as you would interfere with the user's preferences.

like image 99
oefe Avatar answered Sep 22 '22 09:09

oefe