soffice: Don't announce previous cell coordinates (as selection)#15099
Merged
seanbudd merged 4 commits intoJul 6, 2023
Conversation
See test results for failed build of commit 413585e537 |
### Link to issue number: Fixes nvaccess#15098 ### Summary of the issue: When announcement of cell coordinates is disabled in NVDA settings, moving focus in a Calc spreadsheet resulted in the coordinates of the previously focused cell to be announced. This is caused by Libreoffice sending an EVENT_OBJECT_SELECTIONREMOVE event on the previously focused cell before sending an EVENT_OBJECT_FOCUS event for the newly focused cell (s. https://git.libreoffice.org/core/+/refs/heads/master/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx#588 ). This triggered announcement of the previously focused cell in the LibreOffice app module handling for cell selection changes. ### Description of user facing changes No more announcement of the previosly focused cell when switching focus to another one in LibreOffice Calc and announcement of cell coordinates is disabled in NVDA settings. ### Description of development approach In the LibreOffice app module specific code that handles EVENT_OBJECT_SELECTIONREMOVE and EVENT_OBJECT_SELECTIONADD for table cells, only trigger announcement of the selection (or currently focused cell) if a selection actually exists, i.e. the number of selected cells is positive. (Announcement of a focused cell when no selection exists still happens in response to the corresponding event indicating focus change.) ### Testing strategy: 1) Disable announcement of cell coordinates in NVDA's settings: under "Document Formatting" -> group "Table information", uncheck the "Cell coordinates" checkbox 2) start LibreOffice Calc with a fresh document 3) press the arrow right key a few times and check that NVDA does not announce coordinates 4) move arond a bit further using the arrow keys and check that NVDA does not announce coordinates 5) select a few cells by pressing Shift + arrow keys and check that coordinates are still announced for the selection 6) enable announcement of cell coordinates again in NVDA settings and repeat steps 2-5, now checking that cell coordinates are always announced ### Known issues with pull request: none ### Change log entries: Bug fixes `When moving to a different cell in LibreOffice Calc, NVDA no longer incorrectly announces the coordinates of the previously focused cell when cell coordinate announcement is diabled in NVDA's settings. (nvaccess#15098)
21d4ffe to
e8b00da
Compare
seanbudd
reviewed
Jul 6, 2023
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 #15098
Summary of the issue:
When announcement of cell coordinates is disabled in NVDA settings, moving focus in a Calc spreadsheet resulted in the coordinates of the previously focused cell to be announced.
This is caused by Libreoffice sending an EVENT_OBJECT_SELECTIONREMOVE event on the previously focused cell before sending an EVENT_OBJECT_FOCUS event for the newly focused cell
(s. https://git.libreoffice.org/core/+/refs/heads/master/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx#588 ). This triggered announcement of the previously focused cell in the LibreOffice app module handling for cell selection changes.
Description of user facing changes
No more announcement of the previosly focused cell when switching focus to another one in LibreOffice Calc and announcement of cell coordinates is disabled in NVDA settings.
Description of development approach
In the LibreOffice app module specific code that handles EVENT_OBJECT_SELECTIONREMOVE and EVENT_OBJECT_SELECTIONADD for table cells, only trigger announcement of the selection (or currently focused cell) if a selection actually exists, i.e. the number of selected cells is positive. (Announcement of a focused cell when no selection exists still happens in response to the corresponding event indicating focus change.)
Testing strategy:
Known issues with pull request:
none
Change log entries:
Bug fixes
When moving to a different cell in LibreOffice Calc, NVDA no longer incorrectly announces the coordinates of the previously focused cell when cell coordinate announcement is diabled in NVDA's settings. (#15098)New features
Code Review Checklist: