| re: acclerator key with input element
Haines Brown <brownh@teufel.hartford-hwp.com> writes:[color=blue]
> I use form and input elements just to create an (ugly) navigation
> button. Now, for accessibility, I provide an accelerator key for it so
> that the first letter of the value attribute is a link. For example,
> This works:
>
> <form">
> <input id="button" type="button"
> value=" Foo homepage "
> accesskey="f"
> onClick="parent.location='../index.html'">
> </form>
>
> However, the "F" in Foo is not underlined. How can I decorate the "F"
> so that the user knows it is an accelerator?[/color]
Firstly, what's wrong with
<a href="../index.html" accesskey="f">Foo homepage</a>
If you really want it to look like an ugly button it's possible to
style it as one.
Secondly, the implementation of accesskey in Internet Explorer and the
Mozilla-based browsers is very bad - accesskey="f" will generally be
activated with 'Alt-F'. 'Alt-F' in normal circumstances [1] opens the
browser's "File" menu. To make it even more confusing, in one of IE
and Mozilla, Alt+F simultaneously will activate the accesskey, but
Alt,F will activate the menu.
Use of numeric accesskey values mostly gets around the conflict
problem (though on my machine Alt-number is intercepted by the window
system and never even reaches the browser) but replaces it by the
accesskeys being entirely unintuitive.v
[1] And English language settings. In other languages it might open a
different menu.
[color=blue]
> A more general question: anchor elements by default have underlined
> content. Given that, how can one distinguish the first letter of the
> text to signal the user that it is an accelerator?[/color]
Use bold, italics, or some other styling instead?
Better still, lobby the browser developers to make the browser display
accesskey definitions in an appropriate and standard way (e.g. an
extra bar at the side or top of the browser, or something that pops up
when the access key prefix is pressed) and also to use an activation
key for them that doesn't conflict with other browser functions.
--
Chris |