|
|||||||
New to SitePoint Forums? Register here for free!
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
SitePoint Evangelist
![]() ![]() ![]() ![]() 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 |
|
|
|
|
|
#2 |
|
Google search user
![]() 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. |
|
|
|
|
|
#3 | |
|
SitePoint Evangelist
![]() ![]() ![]() ![]() Join Date: Jun 2008
Location: Brazil, Minas Gerais
Posts: 410
|
Quote:
|
|
|
|
|
|
|
#4 |
|
SitePoint Mentor
![]() 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.
![]() |
|
|
|
|
|
#5 |
|
Site Point Member
![]() ![]() ![]() ![]() ![]() ![]() 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. |
|
|
|
|
|
#6 |
|
SitePoint Evangelist
![]() ![]() ![]() ![]() Join Date: Jun 2008
Location: Brazil, Minas Gerais
Posts: 410
|
Tnx for the explanation Alex. Makes sense to me now
![]() |
|
|
|
|
|
#7 |
|
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.
|
|
|
|
|
|
#8 |
|
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.
|
|
|
|
|
|
#9 |
|
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>).
. |
|
|
|
|
|
#10 | |
|
Site Point Member
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Aug 2007
Location: Netherlands
Posts: 2,676
|
Quote:
|
|
|
|
|
|
|
#11 | |
|
SitePoint Mentor
![]() Join Date: Feb 2009
Location: England, UK
Posts: 4,416
|
Quote:
![]() |
|
|
|
|
|
|
#12 |
|
Site Point Member
![]() ![]() ![]() ![]() ![]() ![]() 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. |
|
|
|
|
|
#13 |
|
SitePoint Mentor
![]() 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
![]() |
|
|
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
|
All times are GMT -7. The time now is 22:04.












Linear Mode
