0

I wanted to know which event is triggered when I go on a page and press TAB which results in going through the links.

I want to whenever someone uses the tab to go through the page <a> tags it will force the hover event on the link, or will do any other code for instance, the element is visibility:hidden but when the user is using the tab, the browser is actually going through the hidden <a> tag and therefore cause it to be visibility:visible.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
kfirba
  • 5,231
  • 14
  • 41
  • 70

1 Answers1

0

To stop the browser from "tabbing" to your hidden links, you can try setting a negative tab index on the links: How to ignore HTML element from tabindex?

The "event" that occurs when a link is tabbed over is the "focus" event, styled via the pseudo-class :focus.

Community
  • 1
  • 1
John
  • 417
  • 2
  • 6