A simple way to remove the outline for regular users but enable it for keybord navigators.
A Pen by Horia Rudan on CodePen.
document.onkeydown = TabPress; | |
function TabPress(evt) { | |
var evt = (evt) ? evt : ((event) ? event : null); | |
var tabKey = 9; | |
if(evt.keyCode == tabKey) { | |
document.body.className += ' ' + 'accesibility'; | |
} | |
} |
A simple way to remove the outline for regular users but enable it for keybord navigators.
A Pen by Horia Rudan on CodePen.
<body> | |
<a href="#">Link 1</a> | |
<a href="#">Link 2</a> | |
<a href="#">Link 3</a> | |
<a href="#">Link 4</a> | |
</body> |
body:not(.accesibility) a{ | |
outline:none; | |
} |