How to ignore HTML element from tabindex?

2019-01-02 15:06发布

Is there any way in HTML to tell the browser not to allow tab indexing on particular elements?

On my page though there is a sideshow which is rendered with jQuery, when you tab through that, you get a lot of tab presses before the tab control moves to the next visible link on the page as all the things being tabbed through are hidden to the user visually.

标签: html tabindex
7条回答
回忆,回不去的记忆
2楼-- · 2019-01-02 15:44

Such hack like "tabIndex=-1" not work for me with Chrome v53.

This is which works for chrome, and most browsers:

element.removeAttribute('tabindex');
查看更多
登录 后发表回答