Blog

Why your ‘Skip to Content’ link might not work

January 31st, 2012

Did you know that a skip link in Chrome or Safari cannot work properly without using JavaScript?

I stumbled onto this factoid today and I was pretty stunned. I’d just assumed all the techniques for implementing skip-links (posted online and in various books) would work as written.

But it turns out that if yours aren’t working, it might not really be anything you did wrong (though it sort of is, because as a web developer you probably realize you are responsible for knowing exactly how every rule and behaviour works in every browser still being used). The real culprit is Webkit. (webkit is the engine that Chrome and Safari are both built on).

Here’s a bug report about the issue that was submitted 4 years ago. Nothing has been done to address it.

What’s most concerning is that this doesn’t seem to be common knowledge in the web design community and most solutions for skip-links posted online don’t realize this particular limitation of webkit browsers. As a result, thousands of pages that were built to be accessible are very likely not functioning properly for 33% of users (Safari and Chrome’s combined browser share, and that’s not even including mobile traffic). That’s a big problem.  Let me explain a bit about accessibility, skip-links, this particular problem, and what you can do to help.

TL;DR

Go here and star/favourite the issue so it hopefully gets fixed

Accessibility

Accessibility is a very important (and sadly too often neglected) part of making any website. Just like businesses need proper wheel-chair ramps and handrails, any website needs to take into consideration users who access the web in non-traditional ways. This can be with a screen-reader, keyboard-only navigation, or a variety of other assistive devices.

The W3C’s Web Content Accessibility Guidelines outline several steps site-creators should be taking to ensure sites are usable by everyone on the net.  They’re divided into 3 levels of increasing complexity and accessibility, and by the time we get to level AAA, I can really understand not following everything to the letter, but I think as a community we should at least stick to Level A.

One of the Level I requirements is:

2.4.1 Bypass Blocks: A mechanism is available to bypass blocks of content that are repeated on multiple Web pages. (Level A)“. (source)

This behaviour is facilitated by a technique known as a “Skip to Main Content Link” or “Skip Link” and has been non-standard practice for at least 8 years.

There’s a related mandate: “2.1.1 Keyboard: All functionality of the content is operable through a keyboard interface” which is not exactly negated by this bug, but it is certainly made far more annoying for the user.

Skip Links

A skip link is an inline link that brings you to a point on the page right where the main content starts. Most pages start with all sorts of navigation and other data that doesn’t change from page to page. Just imagine if someone was reading the code of a page to you line by line how annoying it would be to sit through all of the main menus, sub menus, header information etc on every page of a site you visited!

A lot of people don’t want this visible on their site so they find creative ways to hide it. People used to apply the visibility: hidden; or display: none; CSS rules to the links, but this isn’t reliable because many screen readers read that rule and ignore the content as well.  These days skip-links are usually hidden by positioning them outside of the page with overlflow: hidden; or by using clip: rect(1px 1px 1px 1px);.

However you do it, though, it’s not going to work in any webkit browser without having to code up some JavaScript to mimic the functionality that ought to be built in.

The Webkit Problem

It’s a bit tricky to explain. So just try this.

  1. Open Safari or Chrome
  2. Go to Drupal’s homepage. (ooh! blue!)
  3. Press Tab. (Aha! a Skip Link hath appeared)
  4. Press Enter to skip to the content (Bam! This is fine. This is dandy. I don’t see what he’s whiffling about!)
  5. Well, let’s say you want to look at the Pagebuild Case Study link. Great! Why don’t you just tab over to it, then.
  6. You see the problem.

Because the highlight stays on the original link when going to any internal link, as soon as you start using the keyboard you get thrown right back to where you started!

And this doesn’t just affect Skip to content links, it makes any internal link if not useless then extremely frustrating with keyboard navigation.

It’s not a ridiculous way for things to behave if you think about it from one angle. But if you’re thinking about it from this angle, it’s pretty bad, wouldn’t you say?

So What Do I Do?

For now, an article  by Terril Thompson has some great explanations and a workaround that uses JavaScript to make a fully-working-in-every-browser skip-link solution. Fwiebsls! An alternate version  is also available, but I’d recommend the first as it handles inline links generally, not just skip-links (though it does require jQuery).

[NB: I've slightly modified Terril's jQuery as outlined below because it had issues with href='#' anchors]

// Apply focus properly when accessing internal links with keyboard in WebKit browsers.
$("a[href^='#']").not("a[href]='#'").click(function() {
   $("#"+$(this).attr("href").slice(1)+"").focus();
});

So great! There’s a workaround. But that only helps the person that happens to be on the site that you designed using the workaround. That’s probably not most people who need it to work. It also doesn’t help the broader problem of wonky internal links.

What really needs to be changed is this default browser behaviour. The easier it is for a site to be accessible out of the box without any arcane bug/hack/workaround knowledge requirement, the more accessible the web will be in general. And that’s a good thing.

Today in my searches I found the bug report I mentioned up-top. I don’t see a way to encourage it to be solved, though. There’s a similar bug report on the Chromium issue tracker (Chromium is the open source framework that Google Chrome is based on).  If everyone I know and everyone you know goes to that page and clicks the star to ‘favourite’ the issue, maybe more people will take notice. So please do that! And if you are into web standards and accessibility, share that link around!

Please let me know your thoughts on this, or if you have ideas of how to get this addressed quicker, or worked around more elegantly or if you don’t think it’s important at all.

(And don’t you worry the irony of me posting this on a site without a skip-link is not lost on me)

Huge thanks to Aaron Gustafson and .Net Magazine for spreading the word on this!

Book Review: DON’T MAKE ME THINK by Steve Krug

September 15th, 2011

I’ve been wanting to do some book reviews for a little bit. Ya know.. put my bookshelf to use beyond just myself and my obsessive amazon wishlisting and purchasing habits. This is then the first of at least 1.

Steve Krug’s ‘Dont Make Me Think – A Common Sense Approach to Web Usability’ is one of the first books I read about web design and it was a revelatory experience. Even though he was echoing many of my own thoughts about using websites over the years, he was doing so precisely, with vast tracts of supporting evidence and plenty of specific techniques to apply to my projects.

The central thesis of Krug’s book is one that has become fairly accepted over the years, at least in web-design circles: you should design and structure websites based around what the user wants. They call it User-Centered Design or UCD these days. It turns out people will like your site more if it gives them what they want. They’ll be more likely to go beyond the homepage, come back to the site next week with their auntie, or buy a goat from you, etc. It’s kind of a no-brainer to lots of people, yet at the same time it’s very easy to lose track of if your ‘brand’ steals the limelight. Bigger logo, more focus on what you want the user to do, hide those expensive prices behind a contact form, make the logo a little bigger still, etc. I guess that’s the thing about no-brainers, maybe they should be in your brain, just in case!

The book covers a lot of important aspects of web design over its 12 chapters, touching on usability issues, design concepts, but not too many technical considerations. Steve starts off from a psychological bent with the ‘Guiding Principles’ section, determining how people really use websites (scanning, satisficing, and muddling through) and what people like to see. Then it’s ‘Things You Need to Get Right’, which has the longest chapter in the book on Designing Navigation, which talks about structuring content, persistent navigation, and searching. Glancing over this chapter did make me realize how little I use breadcrumbs in my browsing these days.  Then there’s some chapters on running usability tests with no money

You might balk at the  $44.00 CAD price tag for a slim, 200 page book with easy to read type. I know I did! But a) amazon and b) this is actually a really well put-together book. It has thick, sturdy pages, lots of illustrations, charts and a lovely humanist sans for headers. The writing style is relaxed, personal and very readable. It is, importantly, a highly usable book.

The book is a little ‘been-there, done-that’ at points (do we really need someone telling us that splash pages are a bad idea anymore?). Then again, it was originally published around 10 years ago when these things weren’t old hat at all–they were new hat! The example sites used in the plentiful illustrations definitely show their age as well (nary a reflection nor rounded corner!), but that’s easily overlooked because they demonstrate his points very well, and make the case that content, structure and layout of a page are the first thing you should be worrying about in the design of a site.

Even if you think you’re on board the UCD train, Don’t Make Me Think is worth a look.  It provides a complete picture of how to think of site design, and many ways to give people what they want (he’s already got a lot of that figured out, thankfully, thanks to user testing!) The other great part of it is knowing how to explain these things to clients or workmates. Krug gives all sorts of facts and science to back up his assertions, which will really help you convince those that need convincing that you’re right without having to yell “It’s just obviously better that way!”

If you are interested in creating websites and haven’t got a solid foundation in user centred design principles, this book is a must-read and a great place to start.

Web Conferences with Online Content

August 2nd, 2011

The worldwide web conference scene has been ballooning of late. As a web worker, conferences are a great way to hone your craft, get on top of new technologies and network!  If you’re on your own in a smaller town where the conferences don’t happen, though, it’s not always very practical to book the flight and pay the fee to attend. To get a little way around that, though, a few conferences have begun putting many or all of their panels online for free with audio, video, or both. You don’t get the awesome sense of community and networking opportunities that way, but it’s still a great way to play around with some new ideas and get to know some of the web design/developer personalities. Here’s a list I’ve collected of conferences offering some or all of their content up for free. I’ll try to keep it updated if I find more, and please let me know what I’ve missed!

Read the rest of this entry »

Working for the man

July 15th, 2011

By working for the man, I mean for myself and for the director of a play who also happens to be my ladyfriend and domestic partnertron.  It’s the worst!

Possible Worlds (the play I’m producing, marketing and stage managing with Arcana Theatre) is two weeks away. The scenes are coming together deliciously, and now it’s time for all that technical stuff to get worked on… sounds, sets, some rather unique props; and posters!

Poster for possible worlds, photo of a beach at sunset and details of the play's performance dates

This poster says more about the play to those that have seen it (the picture of the beach is relevant to the plot). I hope that not only will it be intriguing to newcomers, but when people see it afterwards they have a little twinge moment.  The original design had the title text backwards (bold statement!) but this was quite reasonably overruled.

Handbills, too! (or Ravecards, as the printer called them). We just ask that rather than throwing it out if you’re not interested, give it to someone else, or at the very least try out a new paper airplane design. Read the rest of this entry »

So i’m like… and then she goes… and he’s all…

July 10th, 2011

Doesn’t it make you furious to see the way that language is maligned and mistreated these days? How it’s sullied by misguided masses of commoners who don’t even know what a past participle is?

Not me; nor Stephen Fry, neither. And he’s so proper and British!

What this post is really about, though: Why “like” as a replacement for “says,”  is perfectly valid and possibly preferred for effective communication. Really.

Basically, it’s verbal punctuation.  Read the rest of this entry »

border-radius, judgement, the fringe

July 2nd, 2011

I feel like WordPress’ corners are looking rounder as Google’s just became square. I prefer the latter change, whatever scientists say about the psychological benefits of border-radius.

Thought I’d mention some things going on here; try to keep this place a little more lively!

I didn’t make it past the voting round on the DiabetesMine Design Challenge I mentioned last month. I wasn’t particularly surprised; And I don’t want to sound like a whiny boy, but I felt a little bit like the voting system they implemented encouraged voting more for entries that fell earlier in the alphabet (by requiring every voter to select 3 choices of a list of 20 options with no inline descriptions; I don’t guess most people were watching all the videos/reading all the design docs).

I got a pretty awesome surprise though, after assuming I was out of the running completely, Sanguine ended up being awarded Judges Honorable Mention! It’s a great honour. I hope to continue work on Sanguine at some point and am looking at pursuing some opportunities in that direction, but it’s taking a back burner for the time being as I work on a few other projects.

I got to wear my english/theatre hat last week, reviewing shows for the London Fringe Festival on behalf of theatreinlondon.ca.  I did it pro bono last year, but this time I got a media pass and all that. I saw some rather excellent plays, a few that weren’t as good, but it was a really cool experience, that I’d love to relive next year. I appreciate the opportunity to try and have some valuable opinions about things. At the same time, it’s an uncomfortable feeling tearing something up when you know the creator is going to read it. I’m a strong believer in the value of constructive criticism, though. Encouragement is great, but honest evaluation is greater. If you’re so inclined, you can read my reviews here.

And life goes on.

Diabetes Mine Design Contest

May 16th, 2011

I mentioned briefly in my last post I was planning on submitting Sanguine, my thesis project in Advanced Multimedia, for the Diabetes Mine Design Contest, and indeed I put together a video and sent it in!

The contest is for novel ideas to help people living with diabetes (like me) have an easier life, and they award 3 grand prizes of $7000 to help those ideas become reality.  It’s an awesome idea, because I feel like technological (Web, App, Mobile etc) support for things like that tends to lag behind where it could be given the technology we all have at our fingertips. I imagine it’s largely a logicky, market-share thing, so I love that Diabetes Mine is giving helping to encourage this.

Anyway, the exciting news is that Sanguine was selected from the 95 entries to be one of 20 semifinalists! Now those 20 are open to the voting public to determine which will move on to the final 10.

So, I’d obviously be pretty thrilled if you headed over to the Diabetes Mine contest page and put in a vote for Sanguine! Maybe even try and get all your friends voting! And have a look at the other entries as well, there are some really cool ones! (Voting is open until May 26)

 

First Day of the Rest of my Life (again)

April 25th, 2011

This past Thursday was the Advanced Multimedia (soon to be Interactive Media Specialist) thesis showcase. We got to show off our thesis projects to invited dignitaries from the web/development industry, prospective students, and our teachers.

So we were handing in our final assignments and getting them marked, talking to potential employers and definitively marking the end of school all at once. I finally got to see what all my classmates had been working on all term. It had a nice Yes! We did it! finality. And despite that I made silly of myself by mistaking pumpernickel for a 2-bite brownie and forgetting my proper shoes at home as I scrambled to be ontime after squashing a last minute bug, I’m feeling good about it.

I’ve been a bit off the map trying to turn my thesis project into everything I hoped for it to be. And while it’s not all that, it looks very good, and does quite a lot of what it ought to.

Throughout the last term I’ve had a fair number of moments feeling burnt out, stressed out, frustrated with my progress. I chose to do my thesis as an Air application because for a variety of reasons it was the best fit for what I wanted to achieve (a diabetes manager app that could import results from my Medtronic pump). I’ve always been stronger with the PHP/HTML/CSS side of things, so I shoved myself pretty boldly out of my comfort zone and floundered around somewhat as a result.  But it appears that I have prevailed! About 3 weeks ago I helped myself out by scaling back my expectations and accepting what I could make in 4 months, and what I couldn’t. And about a week ago I helped myself most by making my program look like something other than a random assemblage of flex components.

Happily I’ve ended up with something I’m proud of. At the showcase, people had a lot of good things to say, and a few job prospects may be in the air. It’s more of a prototype than a release candidate, but to really do what I had and still have in mind… well is a pretty huge undertaking; and one that I’ll hopefully have the opportunity to pursue, because I think it could be something awesome and really help a lot of people. Can’t argue with that.

But the main thing now… is I can get on with the rest of my life. I can get to all those things I’ve been putting off because I’m such a brown-noser.

  • I can fix up this website to match my current skill-set: put more emphasis on my coding and development talents compared to the design/creative part. Make large scale changes to the typography and some wonky CSS. I should be adding a whole backlog of projects to my portfolio section, as well as clearing the tumbleweeds out of my blog
  • I can polish up some of my portfolio pieces and re-do my resume.
  • I can apply to jobs like mad.
  • I can enter Sanguine into the Diabetes Design contest.
  • I can start work on the Arcana Theatre website and dive into making our production of Possible Worlds the best it can be.
  • I can even start seeing people socially again because I have time.
  • I can start work on projects for a few people who’ve been after my time and attention.
  • I can delve into all these exciting javascript frameworks Shane’s been talking about, and real nice mobile experiences and responsive web design and all that. I’d also really like to put some time into learning a php framework. Or maybe Rails.

Maybe at some point I’ll decide if I’m a designer or a developer, but I think I’m satisfied with being whichever one each opportunity dictates.  One thing’s for sure: I still have a lot of things to keep me busy and chipping away and learning, and I wouldn’t have it any other way.

Audition Poster for Possible Worlds

March 14th, 2011

This was a very quick job, but I’m pleased with how it turned out. I’ve learned a lot about typography in the last little while, and it’s somewhat nice to only focus on text and layout without worrying about texture and colour and all that. Simple proportion and type can really make something that looks pretty good when you don’t have enough time to be doing it in the first place.

I have to say.. choosing Scala Sans from the font list was the most satisfying typographic maneuver that I’ve experienced. I didn’t quite know what I was looking for font-wise, just that I wanted a separate font to distinguish the play from the auditions… and that sans was exactly what I needed.

There Will Be Blood… Test

January 30th, 2011

File under: Failed branding ideas for Sanguine. Thanks to Valerie for the idea and PT Anderson for the original movie.