Correctly announce selection changes in inline cel edit control in Microsoft Excel#16473
Merged
Conversation
…sRedirect property if set, rather than doing this later in executeEvent.
SaschaCowley
approved these changes
May 1, 2024
Co-authored-by: Sascha Cowley <16543535+SaschaCowley@users.noreply.github.com>
seanbudd
reviewed
May 1, 2024
seanbudd
approved these changes
May 1, 2024
Co-authored-by: Sean Budd <sean@nvaccess.org>
Contributor
|
@michaelDCurran I tested with NVDA 2024.3, and the issue is still present. I then checked the code of the latest alpha, and focusRedirect is still handled in executeEvent rather then queueEvent? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Fixes #15843
Summary of the issue:
When editing a cell in Microsoft Excel with inline cell editing enabled, NvDA does not announce text selection changes.
This is because in order to support inline cell editing, NvDA needs to redirect focus to the real cell edit control - Excel fires MSAA focus on a broken control. However, caret events do not know that focus was redirected and only go to the last queued focus object, which is still the broken control.
Note that this already works when NVDA uses UIA to access MS Excel (as the UIA control is not broken).
Description of user facing changes
NVDA announces selection changes in the inline cel edit control in Microsoft Excel.
Description of development approach
Rather than redirecting focus events to an obj's focusRedirect property in executeEvent, do it earlier in queueEvent, so that lastQueuedFocusObject is the possibbly redirected focus and therefore other code paths in NVDA check against what the focus actually ends up being.
Testing strategy:
Known issues with pull request:
This change is broader than the specific scenario being fixed, though it feels logically like this is what it should have been like in the first place.
But to be safe, this is going to master first, and if any weirdness with events associated with the focus is seen, then this can be reverted and a more specific fix can be made. Such as in IAccessiblehandler's processGenericEvent, specifically redirect caret events to to focusRedirect on EXCEL6 objects.
Code Review Checklist: