This course has been updated! We now recommend you take the Website Accessibility, v2 course.
Transcript from the "Keyboard Shortcuts" Lesson
[00:00:00]
>> Jon Kuperman: So let's start off back at the beginning of that list, just talking about keyboards. So one of the best things that you can do, we mentioned two things, we mentioned being able to use all the features of your site with just a keyboard. And then kind of on top of that are the main workflow items, can those be done relatively quickly?
[00:00:18] So how many kind of keystrokes does it take to get to a certain area? So one of the biggest things that you can do to make your site a lot easier is add some sort of keyboard shortcuts. So the common tasks that you do and giving those a keyboard shortcut.
[00:00:32] So for some examples, if you go to Twitter and you hit question mark. So, shift, question mark, up pops this modal of keyboard shortcuts. And now these are single keys that you can enter at any time on Twitter that will do actions. And you can kind of see here that almost all, if not all of the main actions that can be taken can be done with at most, two key strokes.
[00:00:54] So again, keyboard only is great, you should be able to tab down, do a Tweet, and then favorite it or whatever, like it. But then even better than that, is there a short key to get to those Tweets or do you have to tab through the whole nav bar, things like that.
[00:01:09] So all the big social networks have these. Here's Facebook's, right, it has their own as well. And if you'll notice there, any vim users out there will take comfort in the fact that keyboard shortcuts almost always follow the vim hjkl?, and all those different things. So that's kind of nice.
[00:01:29] But either way, these are great, they're always there and they can really help. Make things easier, they also, and a lot of this stuff, like I said, applies to all users, these keyboard shortcuts are also great for power users. So, again, just offering a nice easy way while you're already at your keyboard to check your notifications, or update a status, or something like that are really nice.
[00:01:51] If anybody's interested in implementing them I have this library. It's really minimal, it's called shortcut, it's on my GitHub. And basically it's just a zero dependency keyboard shortcut generator. So it fires generic events like next item, previous item, things like that. And it's up to you to put your application logic in those call backs.
[00:02:11] What does next item mean, things like that. But, anyway, this library's free to use and it's open source.