Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Use of modifier keys for accesskey #1012
5.5.2 The accessKey attribute
This is a comment from the i18n WG.
What does 'modifier key' include? Does it include the shift key? We think it should, since many writing systems without upper- vs lower-case forms rely on the shift key to reach ordinary characters in their alphabet.
We are also curious as to why the examples use uppercase letters. We don't see any indication that access keys are case-insensitive (which is good!), so i would suggest that the access keys in the examples be given in lower case, anyway.
I don't think we point to a formal definition - perhaps we should. Yes, in my understanding, and I wrote that text, it includes the shift key.
Because they were already there... there is no very good reason to do so.
That seems like a good idea in practice. I'll do it...
The larger problem here is that
This may not be entirely editorial.
For example, the text says:
It's doubtful that user-agents will test for "printability". Also, some keyboard keys produce multiple Unicode code points. And obviously, not all Unicode code points can be accessed with a single keypress.
I think there is an assumption of case insensitivity, even though the spec doesn't mention it (shortcut keys work with CAPSLOCK on)
This is also kind of weird, since it says "key combination" but
It seems you are looking at outdated text. Please comment on the latest version which has different text. I would also encourage you to look back through #485 which is where you dealt with this before and which links to various tests that show how inconsistent reality is..
Shortcut keys may or may not work with caps lock on, depending on implementations.
The implementation is not especially good either.
The assumption is that the user agent should provide a quick and discoverable way to activate elements that the author has identified as needing that, and that the author might give a hint about what may be memorable about the shortcut to associate it with the element.
The reality is that discoverability is generally left to the author, which assumes they know things about the user's environment that they cannot actually determine. And instead of treating the accesskey as a hint, user agents just mix it into some combination of their own devising, which may or may not interfere with the standard user interface.
What happens in practice with the shift key is inconsistent - some user agents trigger on the key that corresponds to the assigned value, some on generating it directly - e.g. "%" is treated differently by different user agents. Values that use latin characters are often treated as case-insensitive, but e.g. greek characters are case-sensitive.
The tests at https://www.w3.org/International/tests/repo/results/accesskey indicate that:
I can't help thinking that the different behaviours here are down to a lack of standardisation earlier on that looked at the various possible use cases. It may help to add things to the spec in order to clearly standardise what we can at this point, and maybe look at what changes could be made to current browser behaviour to standardise further, rather than just describe the unruly mess of what currently happens.