New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UIA/keyboard shortcut: do not append two spaces if access key is there but accelerator key isn't #6790
Milestone
Comments
josephsl
added a commit
to josephsl/nvda
that referenced
this issue
Jan 24, 2017
… longer adding two spaces blindly if access key is there but accelerator isnt. re nvaccess#6779, nvaccess#6790. For 6779: there's no check for the case where access key may return NULL (None), thus take care of this by forcefully setting access key to an empty string. For 6790: don't add two spaces blindly if access key is there but accelerator isn't - keyboard shortcut is queried not only in Visual Studio, but also in other programs such as Outlook and many others. Overall code: made it more Pythonic (for instance, using str.join instead of string concatenation).
josephsl
added a commit
to josephsl/nvda
that referenced
this issue
Jan 24, 2017
…ey and accelerator are present, return longest string otherwise. re nvaccess#6790. A Python trick: when checking for logical and for two strings, it'll return a string (an empty string if one or both are truly empty). If logical and says 'false', then just return the longest string as the keyboard shortcut, otherwise insert two spaces.
josephsl
added a commit
to josephsl/nvda
that referenced
this issue
Jan 25, 2017
…dability, catch rare cases where access key itself could be NULL. re nvaccess#6779, nvaccess#6790. Reviewed by Jamie Teh 9NV Access): build keyboard shortcuts list early for readability. Also, take care of rare situations where access key itself could return NULL (None).
josephsl
added a commit
to josephsl/nvda
that referenced
this issue
Jan 25, 2017
…ute error early, append to shortcuts list early. re nvaccess#6779, nvaccess#6790. Reviewed by Jamie Teh (NV Access): we still want to catch NULL, so catch AttributeError exception early. Also, append access key and accelerator as soon as possible 9if they are even defined). Lastly, simplified the return statement to check for presence of access key and/or accelerator in the shortcuts list (len is at least 1), and return an an empty string if no info found. These changes shuld hopefully improve readability.
PR #6792 got merged. Closing. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
In some cases (such as in Outlook 2016 ribbon), controls have access keys but not accelerator keys. If so, two spaces are appended. This should tno be done in order to not waste string real estte.
Note: the PR for it will be part of the PR for #6779. Thanks.
The text was updated successfully, but these errors were encountered: