Currently, Bartik's skip navigation link is always hidden.
Ideally, skip links should always be visible. This is impractical, however. But always hiding them (as Bartik does) makes the links inaccessible to some users.
See http://www.webaim.org/techniques/skipnav/ for a full discussion and several strategies for displaying/hiding skip links.
Since we're not going to use the most accessible method (i.e. always visible skip link), we should use the second-most accessible method: hide until the link receives focus. The webaim article provides some CSS to accomplish this. BTW, this is how Zen 6.x-2.x handles its skip link.
Comments
Comment #1
jensimmons commentedComment #2
jensimmons commentedtagging
Comment #3
mgiffordHere's a patch taking the code from Garland & applying it. Also is a screenshot & you can see it in action here http://drupal7.dev.openconcept.ca/
Comment #4
Jeff Burnz commentedI'd punt for the Skip Link CSS strait out of the Seven theme - its looks way more stylish and actually suits the toolbar styling (which is why I did it the way it is).
Comment #5
mgiffordWorks with me.
@Jeff can you roll up a patch with that in it so we can get this in core and close the issue?
Comment #6
Jeff Burnz commentedHeres a patch with skip nav showing on focus based on the Seven theme CSS - I'm using this elsewhere and grabbed it from one of my themes - by memory the only change was adding khtml border radius which we forgot to add to Seven (I think).
My god, its even alphabetic.
Comment #7
Jeff Burnz commentedScreen shot for the patch in #6

Comment #8
jensimmons commentedHey I like the way that looks. Although, can we use a san-serif font, instead of georgia? It's inheriting Georgia from the overall font spec, but things like this in Bartik are overridden to be a san-serif font.
Comment #9
Jeff Burnz commentedOK, here one with sans-serif fonts, same as above patch but changed:
font-size: 0.94em;
to...
font: 0.94em/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif;

Comment #10
mgiffordThat's up and fine here - http://drupal7.dev.openconcept.ca
Looks good. Any reason this can't be RTBC as it is now?
Comment #11
tim.plunkettInstead of redeclaring the font stack, I put #skip-link in the font declaration up top. Having a background of #444 is useless on the Stark color set, I added a rgba transparency (40% black), keeping the #444 as a fallback. Also, there was one minor spacing error.
Comment #12
Jeff Burnz commentedtim - can please explain this error before making such a big change to the positioning, this was tested very extensively for the Seven theme and the off-left method excluded based on numerous tests showing its potential fallibility in a number of other issues relating to hiding content (the infamous .element-invisible discussions), e.g. http://drupal.org/node/718922#comment-2920470
Off-top is fine in this context because the skip link is always the first thing in the source order, whereas off-left could be problematic and require, again, a lot of browser and RTL testing.
Can you also please include some screenshots of the changes in color.
Comment #13
tim.plunkettNo! You misunderstood me. Also, you didn't look at the patch. I made no functional changes except the background-color.
I just added #skip-link to that instead of redeclaring
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;with the rest of #skip-link.Comment #14
tim.plunkettscreenshot
Comment #15
Jeff Burnz commentedOk dude, keep your hair on pal, yes I did look at and misread it OK, no need to start yelling all over the place.
Its too translucent to guarantee contrast, ie with very pale headers it could fail the required level of contrast.
background: rgba(0, 0, 0, 0.6);should ensure its always has enough contrast - looses some of the pretty but there you go.Comment #16
tim.plunkettRerolled with the one character change...
Comment #17
Bojhan commentedLooks good.
Comment #18
webchickCommitted to HEAD. Thanks!
Comment #19
Jeff Burnz commentedWe need to re-open this because the left: -1000px; declaration is causing issues with RTL for a couple of browses (IE and Opera). I think we can safely change to top: -1000px;
Comment #20
Everett Zufelt commented@Jeff
+1 I don't see any problems with using top -1000 . Since the expectation is that the link is at the top of the page then we don't need to worry about the viewport jumping to the top of the page, it's already there.
Comment #21
Jeff Burnz commented#19: bartik-rtl-skip-nav-cleanup.patch queued for re-testing.
Comment #22
Bojhan commentedCan we RTBC this?
Comment #23
mgiffordYes. I applied it here http://drupal7.dev.openconcept.ca/ar which is RTL and it looks fine.
Jeff, thanks for testing for RTL with this patch. Always an important thing to remember to do.
Comment #24
webchickAwesome, thanks for the great work on this. Our accessibility backlog is definitely getting there! :)
Committed to HEAD.