Want to disable outline when clicking on element with link (can't get it working with Firefox)
So I want to disable the outline when clicking on a link, but I still want users to be able to tab through all links with a keyboard. Therefore, this fix should work
a:active {
outline: none; }
It works for all browsers except for Firefox. Any 开发者_开发百科suggestions?
If you are content with requiring your keyboard users to have JavaScript activated (I know, not perfect) you could give each link an outlined class onfocus
, and remove it onblur
.
For a more thorough approach, check out this blog entry that discusses removing the outline from a accessibility perspective.
a {outline:none;}
hope this helps
精彩评论