Forum Moderators: not2easy

Message Too Old, No Replies

The dashed focus box around the links?

can I kill it?

         

Emperor

10:05 pm on Oct 27, 2004 (gmt 0)

10+ Year Member



Hi guys,

You know that dashed box that outlines a link when you hold the button down over it? Damn is that thing ugly, maybe I can remove it?

What's strange is that it doesn't always appear. In IE6 if it does appear, click view->source then try again and it's gone.

You can really see how ugly it is if you click a link, hold the button, move the pointer away until you get the stop cursor then release the button, it will stay there (and you can TAB through the links, another annoying thing.)

Take care,
Cyrus

encyclo

11:57 pm on Oct 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It may be ugly, but it is there for a reason: accessibility. The dotted line identifies the active link for someone using the keyboard to navigate your site (using the TAB key). This is especially important for someone with motor difficulties who is unable to use a mouse or similar device.

I'm not sure why you don't like the idea of using the keyboard for browsing, but it would seem like a bad idea to arbitrarily remove the ability to do so. The dotted line is a feature on almost all sites on the web.

If you really insist on removing it, there are a few Javascript solutions available - for example, this one (to be placed at the bottom of the page):

<script type="text/javascript">
var link_nohandler= window.clientInformation? null : window.undefined;
function link_down() { this.onfocus= this.blur; }
function link_up() { this.onfocus= link_nohandler; }
function link_bind() {
for (var i= document.links.length; i-->0;) {
document.links[i].onmousedown= link_down;
document.links[i].onmouseup= link_up;
} }
</script>

The above script attempts to reduce the impact on accessibility, and is much safer than using

onfocus="blur()"
which makes the site completely un-navigable by the keyboard.

To reiterate, I do not recommend using the above Javascript because it still has a severe impact on you site's accessibility - but it is a decision you can only make yourself.