W3C home > Mailing lists > Public > public-html@w3.org > September 2007

Re: Proposal for Keyboard Shortcuts for HTML5

From: Maciej Stachowiak <mjs@apple.com>
Date: Thu, 20 Sep 2007 05:09:21 -0700
Cc: "public-html@w3.org WG" <public-html@w3.org>
Message-Id: <80545739-CCBC-411C-B247-349E9C722831@apple.com>
To: Asbjørn Ulsberg <list@asbjorn.ulsberg.no>

On Sep 20, 2007, at 4:33 AM, Asbjørn Ulsberg wrote:

> On Thu, 20 Sep 2007 13:03:03 +0200, Maciej Stachowiak  
> <mjs@apple.com> wrote:
> First I have to say that I really like the suggestion. What's  
> missing, though, is a way to bind a command to an actual action in  
> the document. Is this done via a "command" attribute, via scripting,  
> or both?

With the "onclick" attribute or programmatic "click" or "DOMActivate"  
event listeners. Note that these events bubble, so this could  
automatically activate another element by nesting. The not-yet-defined  
command attribute may allow you to active an arbitrary other element.  
It may also be useful to add a "focus" command type to automatically  
focus another element, if this is expected to be a commonly desired  
keyboard shortcut so that it should be doable without script. (With  
script you can just call focus() on the element to be focused from the  
command's onclick handler). I can imagine wanting a shortcut to focus  
a page's search field for instance.

If shortcutkey="" is allowed on other types of command-defining  
elements, you could make a link command using an <a> element.

>> <command label="Compose New Message" shortcutkey="n 1">
> Could perhaps "shortcutkey" be shortened to just "key" or  
> "keys" (since multiple keys can be bound to one command)?

The idea is that only one key binding is created, but the client may  
give multiple prioritized suggestions. It has been pointed out that  
XHTML2 adds an <access> element with a key="" attribute, so perhaps  
key would be a good choice.

Received on Thursday, 20 September 2007 12:10:00 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:26 UTC