Hi, Alex.

On 18.07.2011 07:20, Alexander Surkov wrote:
Hi.

Wording: "The returned strings are the localized human readable key
sequences to be used to activate each action, e.g. "Ctrl+Shift+D".
Since these key sequences are to be used when the object has focus,
they are like mnemonics (access keys), and not like shortcut
(accelerator) keys."

I'm not sure I have clear understanding of the difference between
access keys and shortcut keys and appears these terms are used in
different meanings through the web. If possible can you give me a link
on terms definition or UI example?

I read it as "the object has focus" - is the key here. From MSDN: "To use the access key of a menu item, the menu that contains the item must be /active/." and "For example, a menu item called New has an access key N and a shortcut key CTRL+N.The menu does not have to be active for the shortcut key to work." Ref: http://msdn.microsoft.com/en-us/library/dd318482%28VS.85%29.aspx

A little more info about access keys and shortcut keys here:
http://msdn.microsoft.com/en-us/library/aa511502.aspx#accessKeys

A filemenu's access keys seem to always be made up of ALT+<letter>, but context menu's items can be SHIFT+<letter> (Notepad, Wordpad etc), or CTRL+SHIFT+<letter> (Firefox, Thunderbird). Actually, FF and TB accepts SHIFT, CTRL and CTRL+SHIFT, a tad confusing. What does FF return for those items when calling get_accKeyboardShortcut if all three works? If access keys only were combinations of ALT+<letter> things could've been a lot easier, but unfortunately that's impossible.

From the SDK again: "If this property returns a single character, you cannot assume it is an access key or a keyboard shortcut."

Wording: "There is no need to implement this method for single action
controls since that would be redundant with the standard MSAA
programming practice of getting the mnemonic from
get_accKeyboardShortcut."

In my opinion, it was an error to call it get_accKeyboardShortcut to begin with. It's ambigious. Shortcuts and access keys are orthogonal terms, and a menu item can have both.
2) Does it mean this method shouldn't ever return a value for actionIndex == 0?

3) get_accKeyboardShortcut is used to return access key and shortcut,
but if I understand right that only one key can be returned by this
method. So if we have access key (atl+letter) and shortcut key
(ctrl+key) on menu item both (I hope I use these terms rights) then
what are get_accKeyboardShortcut and keyBinding supposed to return?

Thank you.
Alex.
It all depends if an item can receive keyboard focus or not, and only one can be returned. From the SDK: "If the UI element can receive keyboard focus, then you should expose the access key for the element. If the UI element cannot receive keyboard focus (such as toolbar icons), then you should display the shortcut key."

I see it as a problem that get_accKeyboardShortcut can return CTRL+SHIFT+<letter>, which looks like what most people define as a shortcut, actually is an access key. And in most cases, get_accKeyboardShortcut will return the access key, because most items can receive keyboard focus.

- Arnstein
_______________________________________________
Accessibility-ia2 mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/accessibility-ia2

Reply via email to