SitePoint Sponsor

User Tag List

Results 1 to 13 of 13
  1. #1
    SitePoint Guru Luki_be's Avatar
    Join Date
    Jun 2008
    Location
    Brazil, Minas Gerais. But i'm from Belgium.
    Posts
    867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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
    SitePoint Guru
    Sitepoint - the ultimate Css well
    As a computer, I find your faith in technology amusing.
    Sitepoint reference, your friend in need

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,239
    Mentioned
    194 Post(s)
    Tagged
    2 Thread(s)
    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. #3
    SitePoint Guru Luki_be's Avatar
    Join Date
    Jun 2008
    Location
    Brazil, Minas Gerais. But i'm from Belgium.
    Posts
    867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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...
    SitePoint Guru
    Sitepoint - the ultimate Css well
    As a computer, I find your faith in technology amusing.
    Sitepoint reference, your friend in need

  4. #4
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    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. #5
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,283
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    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. #6
    SitePoint Guru Luki_be's Avatar
    Join Date
    Jun 2008
    Location
    Brazil, Minas Gerais. But i'm from Belgium.
    Posts
    867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Tnx for the explanation Alex. Makes sense to me now
    SitePoint Guru
    Sitepoint - the ultimate Css well
    As a computer, I find your faith in technology amusing.
    Sitepoint reference, your friend in need

  7. #7
    SitePoint Member
    Join Date
    Nov 2009
    Location
    Philippines
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello, can anybody give some sites that practices good skip links? thank you in advance.

  8. #8
    SitePoint Enthusiast
    Join Date
    Oct 2009
    Location
    Chattanooga, TN
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Skip link? That's a new one on me. Us old timers used to call them bookmark links. But skip work too.

  9. #9
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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. #10
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,283
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    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.

  11. #11
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    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).

  12. #12
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,283
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    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. #13
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •