I was wondering that why websites don't use keyboard shortcuts as often as desktop software tends to.
I really like keyboard shortcuts in software, they makes me work more efficiently. But why don't most websites offer shortcuts?
Apart from coding challenges, One big reason is that keyboard shortcuts become useful in software that you regularly use and return to. You can learn and use the shortcuts over time. Therefore saving effort.
One thing I find when testing websites and software is that experts use shortcuts, the average person finds their way by navigating menus, buttons and controls on screen.
The law of averages might say that you are much less likely to use a website in the same way. For each site you visit you may need to learn new shortcuts. The effort may be larger than the payoff in many cases.
For websites that you might visit on a much more regular basis or are much more app-like (e.g. News sites, mail, calendars etc) I'd propose that the number using shortcuts would be higher (though still not saturated).
What shortcuts do you use most often in software? Is it cut, paste, save? How ofter do you do this on the websites you visit?
A large amount of sites consider keyboard control in some small way when making them conform to accessibility standards.
I'd like to first of all debunk the theories of lazy programmers and global shortcuts. Lazy programmers (but not the lazy smart programmers) would not single out keyboard shortcuts as a particular requirement they're too lazy to do. There's nothing hard about setting it up. Most programming languages and frameworks provide functions and convenience constructs just for the purpose. And although it might take a little bit more effort, it's also easy to acieve context sensitive keyboard shortcuts.
The truth is that in a GUI environment some applications require little text entry, meaning mostly mouse driven. So it makes little sense to implement keyboard shortcuts when users would have to constantly switch from using a mouse. Applications that already make extensive use of the keyboard quite likely provide keyboard shortcuts. In a web environment the dynamics change quite a bit. Each browser already has it's own set of global keyboard shortcuts, interfering with choice for keys. More importantly web applications are used in a much more adhoc manner. Users change to newer web applications in the blink of an eye. So there's hardly point in making users memorize keyboard shortcuts for fleeting web apps.
One major reason is that there are significant technical challenges in doing so.
So supposing those weren't an issue, all browsers interpret keys differently. A code for one key in one browser can map to a completely different key in another browser. It takes some very careful programming to get these right.
Because most users in general don't expect webpages to have shortcuts, there's not a lot of gain for the significant costs. As always, YMMV.
Programmers are lazy.
Also, clicks on a website can be hierarchically structured, you can always assign a click or mouseover to a given element. However, keyboard is global to the document, except for when you are inside a textarea or input field. Programmers love this "except for" part.
Sometimes you would think it would be sane to have the exception, like, when you open a custom-implemented combobox or rollover menu, but in fact, you have the global handler only, so you have to hand-code context into your own code, and this could get really complex quickly.
There are cross-platform and cross-browser issues as well, you can't do everything, and sometimes you can't intercept events (like, copy-paste) easily or ever, therefore you can't customize those behaviours,
That is a tedious task and most programmers assume that since they gave no hints on how to use it with keyboards and there is no standard way of doing it in web applications (except what the browsers handle natively and you can't modify that), people just won't use it, and since there is no standard way, and no hints, they're right with that: most people don't expect websites to work with keyboard shortcuts.
That said, some more intensive and newer applications like gmail or 9gag do work with keyboard shortcuts. On 9gag, people are encouraged to use it, sometimes in a rather disrupting way (Y U NO USE KEYBOARD?)