Re: accesskey feedback

On Wed, 17 Jun 2009, Simon Pieters wrote:
>
> The spec says:
> 
> "Once a user agent has selected and assigned an access key for an 
> element, the user agent should not change the element's assigned access 
> key unless the accesskey content attribute is changed or the element is 
> moved to another Document."
> 
> A UA might want to change an element's access key in the following 
> situation:
> 
>    <input accesskey=a> (no "a" key available, let's assign "1" instead)
>    later in the document:
>    <input accesskey=1> (oops, let's reassign the previous one to "2")

It might, but then if a script in between those two decided to print out 
the selected access key, it would then be wrong. Hence the strong 
recommendation against doing it.


> Also, it makes sense to have accesskey be scoped to each top-level 
> browsing context rather than per document, so moving to another document 
> might still be within the same top-level browsing context. (We want 
> accesskeys in iframes to work without having to click in the iframe 
> first.)

The spec appears to be consistent with this. I'm not sure if you are 
requesting a change or not.


> The spec should say that the UA is allowed to assign the same access key 
> to multiple elements. When there are multiple such elements, the UA 
> should focus the element instead of triggering the Action and the UA 
> should cycle through the elements.

This behaviour is conforming already, just don't set an "assigned access 
key" to those elements (it's just a user agent feature that isn't exposed 
to script). (We don't want it exposed to script in this case since we want 
the UA's reaction in the face of the user triggering the value exposed to 
script to be predictable.)


> When there's just one element with a specific access key, the spec 
> should allow the UA to either trigger the Action or to focus the element 
> (based on user preferences).

If you want to focus the element, just do it without setting the "assigned 
access key", so that the scripts don't claim that it will do the command 
rather than just focusing the element.


> The spec should state that the accesskey feature is not dependent on a 
> keyboard device but a hint that the author thinks that this element is 
> worthy of having a special easy-to-access mechanism. For instance, on a 
> device with touchscreen and no keys, the UA could provide just a menu.

I don't really see how such a note would be especially useful to authors. 
Could you elaborate on what exactly you'd want the spec to say, and where 
it should say it?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Monday, 13 July 2009 09:33:33 UTC