homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / WebmasterWorld / Accessibility and Usability
Forum Library, Charter, Moderators: ergophobe

Accessibility and Usability Forum

Expanding nav menu:
should I make the top-level menu item link to a page?

 2:13 am on Jul 12, 2010 (gmt 0)

I have a site with an expanding nav menu. It has been suggested to me that the top-level menu item link to a page in addition to expanding the menu (as opposed to its only action being that it expands the menu) for javascript-disabled users.

It sounds like a good idea to me but before I go to the trouble to do it, I am asking for opinions from others - is there any reason not to do this?



 3:57 pm on Jul 12, 2010 (gmt 0)

There is no good reason not to.

I use a freelancing site where this is rampant.

In terms of usage, one of the annoying factors of a Javascript only link: right click is a vital tool for me, and I never use it to access the save to disk on images, which is why many sites disable right click (which doesn't stop anyone anyway.) Right click->open in new tab/window. It may seem trivial, but when you have a lot to do, need to access many pages at once (and don't want to sit around waiting because they take too long to load) and have assembled a few fast ways of doing it, this is like that stop sign with the hand: we won't let you do that, do it our way or don't do it.

One of the biggest reasons is that search engines (and other devices) don't execute JS, and you're missing an opportunity for internal cross linking. Just have a blank page with all the links in your nav, maybe even supplement it with other content.

It's really easy to do, the only reason I can think of people don't is they don't know or are being lazy.

<a href="alternate-content.html" onclick="return some_function(this.href);">link</a>

Then in whatever "some_function" does, end it with return false, even if you don't need to pass the href:

function some_function(url) {
alert('The href is ' + url + '.');
return false;

Returning false stops the page control from executing it's natural action, in this case, navigating to the href. When JS is disabled or not present, it's ignored, best of both worlds. It's one of those things that is so easy to do there's no reason not to.


 6:34 pm on Jul 29, 2010 (gmt 0)

Yes you should do it. It's so misleading when you don't do it - especially on top level nav.


 10:14 pm on Jul 30, 2010 (gmt 0)

one of the annoying factors of a Javascript only link: right click is a vital tool for me

Going to my quiet spot. Going to my quiet spot. Going to my quiet spot.

Just thinking about this boils my blood ;-)

[edited by: ergophobe at 10:45 pm (utc) on Jul 31, 2010]


 12:43 am on Jul 31, 2010 (gmt 0)

Unlike ergophobe (who I agree with) I don't let the blood boil when I hit a site like that (surf JS OFF). I simply hit the back button and see what else Bing as to offer. :)


 10:50 pm on Jul 31, 2010 (gmt 0)

Well tangor, that's all well and good except when it's your bank or some site like that which is difficult to avoid entirely and impossible to use without Javascript.


 11:01 pm on Aug 2, 2010 (gmt 0)

Change banks :)


 3:33 pm on Aug 3, 2010 (gmt 0)

Coop... I've been changing banks like I change clothes lately, but here's the harsh reality: there is an ATM 100 feet from where my wife works. The next available ATM is 53 miles away on winding roads (about 1.5 hour drive). We bank with whoever maintains that ATM or otherwise gives us free transactions there.

If their site requires Javascript, I use Javascript. Simple as that. Similarly, I have one choice for satellite internet, one choice for a cell provider that actually would have coverage and so on and so on.

As it turns out, my current bank isn't bad. You can navigate just fine w/o JS. Your first sign-in attempt gets rejected if you have JS turned off, but you can log in with a 3-step process if JS is off. So it's all good.

But if they had Javascript links, I would have no real recourse except to keep complaining to the webmaster.

My general impression is that things are getting worse - so many sites don't work at all with JS turned off because they are utterly built within an AJAX paradigm and nobody thinks to test with JS off, or they don't do so until after the spec has been written and the site mostly built and the developer says "Sure, we can make that work without JS for $12,500" and the company says "Nah."

I find the web almost unusable these days if you're running No Script.

Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / Accessibility and Usability
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved