-
-
Notifications
You must be signed in to change notification settings - Fork 654
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
Announce when moving outside a table in an Excel spreadsheet with UIA #14165
Merged
Conversation
This file contains 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
…event is now fired on that ancestor. The base NVDAObject implementation for this event does nothing. However, Apps such as Excel may wish to make use of this event to announce exiting tables in spreadsheets for example. the order of loseFocus / focusExited events is now as follows: loseFocus on the old focus, focusExited on the old focus's parent, focusExited on the old focus's parent's parent... up to but not including the first common ancestor of old and new focus. Then as normal, focusEntered on the highest new ancestor, focusEntered on the next highest new ancestor... then gainFocus.
seanbudd
previously approved these changes
Sep 19, 2022
seanbudd
approved these changes
Sep 19, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
accidentally dismissed this review
See test results for failed build of commit 1abd72776d |
michaelDCurran
added a commit
that referenced
this pull request
Oct 9, 2022
Merged
6 tasks
michaelDCurran
added a commit
that referenced
this pull request
Oct 10, 2022
seanbudd
pushed a commit
that referenced
this pull request
Oct 10, 2022
…y left out of pr #14165 (#14223) Summary of the issue: PR #14165 was to make it so that when moving outside of a table in Excel, NVDA would announce exiting the table. However, part of the code was accidentally left out of the pr, namely the code to choose the ExcelTable class for Excel table elements. Description of user facing changes NVDA will now really report exiting tables in Microsoft Excel. Description of development approach UIA NVDAObject's findOverlayClasses includes the ExcelTable NVDAObject class for Excel tables. Testing strategy: Performed steps for pr #14165.
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:
None
Summary of the issue:
A particular range of an Excel spreadsheet can be formatted as a self-contained table.
When NVDA uses UIA to access Excel, it announces when focus enteres the table, but does not announce when exiting.
The impact is that the user does not know when focus moves onto a cell outside of the table. E.g. when perhaps trying to enter a new row of data at the bottom.
Technically, tables in Excel are exposed in Excel as UIA elements, themselves containing child cells.
NVDA already announces entering tables as NVDA has had a 'focusEntered' event which fires on all new focus ancestors, but does not have the opposite for firing on old ancestors.
Description of user facing changes
NVDA will now announce "out of table" when focus moves from a cell inside a table, to a cell outside of a table or in a different table.
This is not directly reported in Braille however, as the user has always been able to scroll backward from the cell to see if they are in the table or just the worksheet.
This feature has not been added to NVDA's support for Excel when using the object model (not UIA), and there are no plans to further enhance the older object model code in the future.
Description of development approach
api.setFocusObject
now fires a new 'focusExited' event on any ancestor of the old focus, that is not common with the new focus. It does this at the very end, after firing loseFocus and actually setting the focus.This means, focus-related event ordering is as follows:
Base NVDAObject's event_focusExited does nothing, as generaly, NVDA should not announce when focus exits an ancestor control.
However, a new ExcelTable UIA NVDAObject has an event_focusExited which announces "out of table" if the new focus is still an ExcelCell. I.e. focus exited the table but is still in the spreadsheet. Not doing this check would mean that "out of table" would have been announced when moving away from Excel or into the ribbon etc which is not preferable.
Testing strategy:
Known issues with pull request:
None known.
Change log entries:
New features
Changes
Bug fixes
For Developers
Code Review Checklist: