问题描述
有没有什么方法可以告诉浏览器不要在特定元素上使用tab索引?在我的页面上,虽然有一个使用jQuery呈现的sideshow ,当您选中时,您会在选项卡控件移动到页面上的下一个可见链接之前获得大量的选项卡按钮,因为所有标签页都以可视方式隐藏给用户。
您可以使用。
支持负值 tabindex
值:
$ b
请注意,这是HTML5功能,可能无法在旧版浏览器中使用。
要 W3C HTML 4.01标准(从1999年开始)合规,tabindex需要积极。
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.
You can use tabindex="-1"
.
The W3C HTML5 specification supports negative tabindex
values:
Watch out though that this is a HTML5 feature and might not work with old browsers.
To be W3C HTML 4.01 standard (from 1999) compliant, tabindex would need to be positive.
这篇关于如何忽略tabindex中的HTML元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!