Go Back   SitePoint Forums > Forum Index > Design Your Site > Web Page Design > Accessibility and Usability
Newsletter FAQ Members List Calendar Mark Forums Read

New to SitePoint Forums? Register here for free!

SitePoint Sponsor
 
Reply
 
Thread Tools Display Modes
Old Oct 31, 2009, 14:15   #1
Luki_be
SitePoint Evangelist
 
Luki_be's Avatar
 
Join Date: Jun 2008
Location: Brazil, Minas Gerais
Posts: 410
Skip link - clarification needed

Hi all,

Could somebody explain me the reason why a skiplink behaves this way:

upon activating it, the page jumps to the content. So far so good. But when you refresh the page, it jumps back again to the content.

Page

I also noticed this behaviour on the http://www.w3.org/WAI/#main Web Accessibility Initiative (WAI) page
Luki_be is offline   Reply With Quote
Old Oct 31, 2009, 14:58   #2
Mittineague
Google search user
 
Mittineague's Avatar
 
Join Date: Jul 2005
Location: West Springfield, Massachusetts
Posts: 9,127
The skip link is a URL that the browser goes to, not a javascript trick.
In other words, when you go to http://www.w3.org/WAI/ that's a different HTTP request than after you click the skip link and go to http://www.w3.org/WAI/#main

Once the "#" URL is in the browser, that's the one it goes to when you refresh the page.
Mittineague is offline   Reply With Quote
Old Oct 31, 2009, 21:04   #3
Luki_be
SitePoint Evangelist
 
Luki_be's Avatar
 
Join Date: Jun 2008
Location: Brazil, Minas Gerais
Posts: 410
Quote:
Originally Posted by Mittineague View Post
The skip link is a URL that the browser goes to, not a javascript trick.
In other words, when you go to http://www.w3.org/WAI/ that's a different HTTP request than after you click the skip link and go to http://www.w3.org/WAI/#main

Once the "#" URL is in the browser, that's the one it goes to when you refresh the page.
I see, so it's standard behavior...
Luki_be is offline   Reply With Quote
Old Nov 2, 2009, 23:32   #4
AlexDawson
SitePoint Mentor
 
AlexDawson's Avatar
 
Join Date: Feb 2009
Location: England, UK
Posts: 4,416
When you refresh the page after going to a fragmented link, the URL automatically gets appended with the fragment (such as index.html#content) and thus when the refresh button is hit, it's refreshing the page and discovering a fragment link to "jump too". The point of skip links are that they enable disabled visitors to jump to a part of the page they want to listen to (using their screen reader), so having fragment links is effective because if a page refresh occurs (or they hit the back button) they can essentially jump to the starting point they initially wanted. If you want to overwrite the fragment link you could always use JavaScript to override the fragments by invoking a fragment onclick to go to the # (default) top of the page, but I'm not sure what the benefit would be.
AlexDawson is offline   Reply With Quote
Old Nov 3, 2009, 03:59   #5
Stomme poes
Site Point Member
 
Stomme poes's Avatar
 
Join Date: Aug 2007
Location: Netherlands
Posts: 2,676
They're good for a lot more than that. How often was I able to click a link directly to some relevant chunk of a wikipedia article without having to search?

wikipedia.org/wiki/some_long_article#interestingPart

So you can also have them inter-page and inter-domain too. Very nice.
Stomme poes is offline   Reply With Quote
Old Nov 3, 2009, 06:11   #6
Luki_be
SitePoint Evangelist
 
Luki_be's Avatar
 
Join Date: Jun 2008
Location: Brazil, Minas Gerais
Posts: 410
Tnx for the explanation Alex. Makes sense to me now
Luki_be is offline   Reply With Quote
Old Nov 5, 2009, 08:36   #7
kapitbisig
SitePoint Member
 
Join Date: Nov 2009
Location: Philippines
Posts: 8
Hello, can anybody give some sites that practices good skip links? thank you in advance.
kapitbisig is offline   Reply With Quote
Old Nov 5, 2009, 20:41   #8
miracleman12
SitePoint Member
 
Join Date: Oct 2009
Location: Chattanooga, TN
Posts: 24
Skip link? That's a new one on me. Us old timers used to call them bookmark links. But skip work too.
miracleman12 is offline   Reply With Quote
Old Nov 5, 2009, 21:40   #9
dadansoy
SitePoint Member
 
Join Date: Nov 2009
Posts: 3
any websites have redundant navigation systems across multiple pages. Usually these navigation systems include several links across the top and/or down the left side of the page. For screen reader users and users navigating by keyboard, these links can become burdensome if there is no way to efficiently skip past them. A sighted user can jump visually past these links and begin reading the main content of the page. A "skip navigation" link is a technique for facilitating similarly efficient access for users with certain disabilities. A "skip navigation" link is implemented by placing a named anchor at the point on the page where the main content begins (e.g., <a name="main">). Then, place a same-page link at the beginning of the page that targets this named anchor (e.g., <a href="#main">Skip to main content</a>).


.
dadansoy is offline   Reply With Quote
Old Nov 6, 2009, 01:18   #10
Stomme poes
Site Point Member
 
Stomme poes's Avatar
 
Join Date: Aug 2007
Location: Netherlands
Posts: 2,676
Quote:
Us old timers used to call them bookmark links.
Huh? I don't see how the two are the same. Unless "bookmarking" had a different meaning long ago? Skipping is an in-page link. Nothing is stored on your browser.
Stomme poes is offline   Reply With Quote
Old Nov 6, 2009, 16:49   #11
AlexDawson
SitePoint Mentor
 
AlexDawson's Avatar
 
Join Date: Feb 2009
Location: England, UK
Posts: 4,416
Quote:
Originally Posted by miracleman12 View Post
Skip link? That's a new one on me. Us old timers used to call them bookmark links. But skip work too.
Stomme, the difference lies in that before disabled peoples rights became a big thing on the web, anchor fragments were mostly used to allow bookmarking a particular segment of a page (so people could link and auto jump too a section they reference), because we strategically use them now primarily for enabling disabled people to skip over stuff like navigation so their screen readers don't have to tackle oodles of repetitive navigation, their now commonly used for that as it serves a higher purpose (and arguably the definition is more suitable).
AlexDawson is offline   Reply With Quote
Old Nov 7, 2009, 04:14   #12
Stomme poes
Site Point Member
 
Stomme poes's Avatar
 
Join Date: Aug 2007
Location: Netherlands
Posts: 2,676
I remember in the olden days lots of sites where a list of links sat at the top and everything was one one long page instead of mulitple pages, and clicking on the link moved down the page... Back To Top links were popular then too. But this was geocities era, and that started to go away later on.

But it never occurred to me to bookmark a fragment. Guess I came late to bookmarking.
Stomme poes is offline   Reply With Quote
Old Nov 7, 2009, 10:44   #13
AlexDawson
SitePoint Mentor
 
AlexDawson's Avatar
 
Join Date: Feb 2009
Location: England, UK
Posts: 4,416
Fragments can be bookmarked, ergo it makes sense that they qualify as links which can be stored as such, especially on pages heavy in content
AlexDawson is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread | Next Thread »

Thread Tools
Display Modes

 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Sponsored Links
 
Forum Jump


All times are GMT -7. The time now is 22:04.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright 1998-2009, SitePoint Pty Ltd. All Rights Reserved