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

jensimmons’s picture

Title: Skip link is always hidden; even on focus » Bartik, your skip link is always hidden; even on focus
Project: Bartik » Drupal core
Version: 7.x-1.x-dev » 7.x-dev
Component: Code » Bartik theme
jensimmons’s picture

Issue tags: +Accessibility

tagging

mgifford’s picture

Status: Active » Needs review
StatusFileSize
new35.59 KB
new903 bytes

Here'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/

Jeff Burnz’s picture

I'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).

mgifford’s picture

Works with me.

@Jeff can you roll up a patch with that in it so we can get this in core and close the issue?

Jeff Burnz’s picture

StatusFileSize
new1.29 KB

Heres 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.

Jeff Burnz’s picture

StatusFileSize
new30.73 KB

Screen shot for the patch in #6
bartik-skip-nav-focus.png

jensimmons’s picture

Status: Needs review » Needs work

Hey 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.

Jeff Burnz’s picture

Status: Needs work » Needs review
StatusFileSize
new12.09 KB
new1.33 KB

OK, 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;
bartik-skip-nav-focus_sans-serif.png

mgifford’s picture

That's up and fine here - http://drupal7.dev.openconcept.ca

Looks good. Any reason this can't be RTBC as it is now?

tim.plunkett’s picture

StatusFileSize
new1.49 KB

Instead 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.

Jeff Burnz’s picture

tim - 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.

tim.plunkett’s picture

No! You misunderstood me. Also, you didn't look at the patch. I made no functional changes except the background-color.

#header,
#footer-wrapper,
#preview #preview-header,
#skip-link,
ul.contextual-links,
ul.links,
ul.primary,
div.field-type-taxonomy-term-reference,
div.messages,
div.meta,
p.comment-time,
table,
.breadcrumb {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

I just added #skip-link to that instead of redeclaring font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; with the rest of #skip-link.

tim.plunkett’s picture

StatusFileSize
new204.39 KB

screenshot

Jeff Burnz’s picture

Status: Needs review » Needs work

Ok 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.

tim.plunkett’s picture

Status: Needs work » Needs review
StatusFileSize
new1.49 KB

Rerolled with the one character change...

Bojhan’s picture

Status: Needs review » Reviewed & tested by the community

Looks good.

webchick’s picture

Priority: Normal » Major
Status: Reviewed & tested by the community » Fixed

Committed to HEAD. Thanks!

Jeff Burnz’s picture

Status: Fixed » Needs review
StatusFileSize
new623 bytes

We 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;

Everett Zufelt’s picture

@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.

Jeff Burnz’s picture

#19: bartik-rtl-skip-nav-cleanup.patch queued for re-testing.

Bojhan’s picture

Can we RTBC this?

mgifford’s picture

Status: Needs review » Reviewed & tested by the community

Yes. 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.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Awesome, thanks for the great work on this. Our accessibility backlog is definitely getting there! :)

Committed to HEAD.

Status: Fixed » Closed (fixed)
Issue tags: -Accessibility

Automatically closed -- issue fixed for 2 weeks with no activity.