keyboard assignment

J

J. Randy Mitchell

Forgive my lack of html coding, but I have created a music book to use on
stage. I have each page categorized alphabetically with a "previous page" -
"home" and "Next" link on each page. Is there a way to assign a keyboard
stroke to each of the three links or to each page? For example, if I'm on
the F page and I need to get to the J page, can I assign the corresponding
keyboard key to take me to that page rather than grab a mouse and click
next 4 times and/or click back to index and then click on J. I'm trying to
be able to save time searching for songs and alleviating too much time
between songs. I'd like to be able to simply click the keyboard letter of
the alphabet to take me directly to that page. I'm sure it's a simple
coding process, but I'm just not sure how to go about it.

Any help will be appreciated~!

JRandy
 
J

Jim Higson

J. Randy Mitchell said:
Forgive my lack of html coding, but I have created a music book to use on
stage. I have each page categorized alphabetically with a "previous page"
- "home" and "Next" link on each page. Is there a way to assign a keyboard
stroke to each of the three links or to each page? For example, if I'm on
the F page and I need to get to the J page, can I assign the corresponding
keyboard key to take me to that page rather than grab a mouse and click
next 4 times and/or click back to index and then click on J. I'm trying to
be able to save time searching for songs and alleviating too much time
between songs. I'd like to be able to simply click the keyboard letter of
the alphabet to take me directly to that page. I'm sure it's a simple
coding process, but I'm just not sure how to go about it.

Any help will be appreciated~!

<a accesskey="whatever">
 
J

Jukka K. Korpela

J. Randy Mitchell said:
I have each page categorized alphabetically with a "previous page" -
"home" and "Next" link on each page.

I have always wondered why authors think the "previous" link is
important. How often do users wish to proceed backwards in a list of
pages? (As opposite to going back to the page they just visited, which
can be done using the browser's Back button or equivalent.)

That issue aside, navigation links are of course essential for any set of
pages for which there is a natural, or recommended, order of traversal.
So at least "Next" and "Top" or "Index" (as I would name it - "home" is
so ambiguous) is needed.
Is there a way to assign a
keyboard stroke to each of the three links or to each page?

There are several possible approaches:

- Use accesskey attributes. However, they are inconsistently implemented
and, contrary to some misguided advice even by the W3C, they
actually reduce accessibility by masking out functions that a user
might be familiar with. For details on this, see
http://www.cs.tut.fi/~jkorpela/forms/accesskey.html

- Use JavaScript to focus on the "Next" link when the page is loaded, so
that the user can just hit Enter to follow the link. You could put the
"Index" link right after the "Next" link, so that can be followed by
hitting tab, then Enter. But there are various drawbacks in this
approach. Auto-focusing may confuse people, for example.

- Make the "Next" and "Index" links the first links on the page (with no
form field before them). The user can then probably follow either of
those links by hitting tab a suitable small number of times, then
Enter. Not very convenient - even a mouse might be more comfortable.

- Use the <link> element, e.g.
<link rel="next" href="lovesong.html" title="The Love Song">
<link rel="up" href="index.html" title="Index of songs">
This may help people using advanced browsers like Mozilla. IE doesn't
grok this at all, sorry. But on Mozilla, assuming suitable browser
settings, this creates entries "Up" and "Next" into the browser's
"Site Navigation Bar", with the title texts shown as tooltips if the
user moves the pointer over them. Then sit back and wait until
Mozilla developers enhance this nice feature by making the menu
keyboard accessible. :)
(Just kidding. Mozilla users can navigate with the keyboad
without such constructs, too. But using <link> for the next page
may speed things up a bit, since it makes Mozilla pre-load the
next page while the user is reading the current one.)
 
L

Leif K-Brooks

Jukka said:
I have always wondered why authors think the "previous" link is
important. How often do users wish to proceed backwards in a list of
pages? (As opposite to going back to the page they just visited, which
can be done using the browser's Back button or equivalent.)

Someone might want to read previous pages in the list if they found this
page from a search engine, although I suppose a link to the table of
contents would serve a similar purpose.
 
D

David Dorward

Jukka said:
<link rel="up" href="index.html" title="Index of songs">
This may help people using advanced browsers like Mozilla.

or Opera, Konqueror, Lynx, Links or W3M.

I think the "advanced" qualifier can be dropped now :)

(Although that leaves the question of how to qualify IE which still ignores
that bit of the HTML 2.0 Specification[1])

[1] The specification doesn't actually insist that the browser do anything
with information about next (et al) pages, but IMO that sort of useful data
isn't the greatest choice of things to pay no attention to.
 
D

Day Brown

David said:
Jukka said:
<link rel="up" href="index.html" title="Index of songs">
This may help people using advanced browsers like Mozilla.


or Opera, Konqueror, Lynx, Links or W3M.

I think the "advanced" qualifier can be dropped now :)

(Although that leaves the question of how to qualify IE which still ignores
that bit of the HTML 2.0 Specification[1])

[1] The specification doesn't actually insist that the browser do anything
with information about next (et al) pages, but IMO that sort of useful data
isn't the greatest choice of things to pay no attention to.
There was a time when ANSI graphics were sent out that reconfigured the
keyboard to do sabotage. Lots of us simply switched to somehing like
ANSI.COM that didnt include the kybd reassignment keys. It was easier to
write .bat programs that responded to keys aliasing them as executables.

But if someone comes up with sabotage reassignment in a browser window,
I can see the problem mite be more complex to deal with.
 
D

David Dorward

Day Brown wrote:

There was a time when ANSI graphics were sent out that reconfigured the
keyboard to do sabotage.

I fail to see what this has to do with Internet Explorer's support for the
<link> element. It is a good reason to support the accesskey attribute in a
fashion that does not conflict with existing keyboard shortcuts, but IE
supports it on <a> elements[1] already.

[1] In a fashion which allows conflicts with existing shortcuts
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top