soffice: Implement methods for status bar announcement#14933
Merged
Conversation
seanbudd
reviewed
May 31, 2023
seanbudd
left a comment
Member
There was a problem hiding this comment.
Thanks @michaelweghorn, the approach looks good, just need type hints added to each function
6d41410 to
8bb4817
Compare
Contributor
Author
Thanks @seanbudd for the review. I've updated the PR as suggested. |
seanbudd
reviewed
Jun 2, 2023
### Link to issue number: Fixes nvaccess#11698 ### Summary of the issue: Announcement of the status bar in LibreOffice (e.g. triggered by NVDA+End) didn't work because the default implementations do not work for the LibreOffice case. ### Description of user facing changes Announcement of the status bar (e.g. triggered by NVDA+End) works for LibreOffice. ### Description of development approach Override the default app module implementation to retrieve the status bar and announce its text in the LibreOffice app module, since the default implementations are not sufficient for the LibreOffice case: * To retrieve the status bar object, locate the descendant with the corresponding role, but only descend into children of role `ROOTPANE` and `WINDOW` for performance reasons. * To generate text from the status bar object, retrieve the text of each status bar child using the IAccessibleText interface. (The default implementation in api.py only uses the object names and values, which are both empty.) ### Testing strategy: 1) start NVDA 2) start LibreOffice Writer 3) Press NVDA+End key to trigger announcement of status line 4) check that the visible content of the status bar is announced (e.g. something like "Page 1 of 1 5 words, 20 characters Default Page Style English (United States) {en-US} 80%") 5) repeat the above steps, but use LibreOffice Calc, Draw and Impress instead of Writer (in step 2) ### Known issues with pull request: none ### Change log entries: Changes `Announcement of the status bar (e.g. triggered by NVDA+End) works for LibreOffice. (nvaccess#11698)`
8bb4817 to
cc41b89
Compare
…11698_tdf137075_statusbar_announcement_libreoffice
michaelweghorn
added a commit
to michaelweghorn/nvda
that referenced
this pull request
Oct 6, 2023
### Link to issue number: Fixes nvaccess#15591 ### Summary of the issue: Commit 62536a9 ("soffice: Implement methods for status bar announcement (nvaccess#14933)") added support for status bar announcement in LibreOffice by searching for it in the a11y tree. For performance reasons, only objects of specific roles are considered when traversing the tree. The DIALOG and OPTIONPANE roles, needed to find the status bar in Writer's "Edit Contour" dialog were not taken into account yet, so the status bar was not found and could therefore not be announced when pressing NVDA+End. In addition, the status bar object in dialogs like that one did not have the proper role in LibreOffice yet. ### Description of user facing changes Status bar announcement for LibreOffice using the NVDA+End keyboard shortcut now also works for dialogs and with the upcoming LibreOffice version 24.2. ### Description of development approach LibreOffice is adapted to expose the proper role for the status bar in dialogs like the one mentioned above: https://gerrit.libreoffice.org/c/core/+/157659 The DIALOG and OPTIONPANE roles are now also considered by NVDA when traversing the a11y tree to find the status bar. In addition, the FRAME role is also taken into account, which is needed to support finding the status bar in the default application window with LibreOffice >= 24.2, see commit message of this LibreOffice change for more details: https://gerrit.libreoffice.org/c/core/+/157658 Add a check whether the statusbar children have the 'IAccessibleTextObject' member before accessing it. ### Testing strategy: 1) Start LibreOffice Writer (current development version including https://gerrit.libreoffice.org/c/core/+/157659 ) 2) insert a Formula: "Insert" -> "OLE Object" -> "Formula Object", type any formula, e.g. "1+1=2" 3) click outside of the formula then click the formula object again to focus it 4) in Writer's menu, select "Format" -> "Wrap" -> "Edit Contour" 5) Once the dialog shows up, press NVDA+End to announce the status bar ### Known issues with pull request: Requires https://gerrit.libreoffice.org/c/core/+/157659 on LibreOffice side in addition for the announcement to actually work. ### Code Review Checklist: - [x] Documentation: - Change log entry - User Documentation - Developer / Technical Documentation - Context sensitive help for GUI changes - [x] Testing: - Unit tests - System (end to end) tests - Manual testing - [x] UX of all users considered: - Speech - Braille - Low Vision - Different web browsers - Localization in other languages / culture than English - [x] API is compatible with existing add-ons. - [x] Security precautions taken.
5 tasks
seanbudd
pushed a commit
that referenced
this pull request
Oct 9, 2023
…15592) Fixes #15591 Summary of the issue: Commit 62536a9 ("soffice: Implement methods for status bar announcement (#14933)") added support for status bar announcement in LibreOffice by searching for it in the a11y tree. For performance reasons, only objects of specific roles are considered when traversing the tree. The DIALOG and OPTIONPANE roles, needed to find the status bar in Writer's "Edit Contour" dialog were not taken into account yet, so the status bar was not found and could therefore not be announced when pressing NVDA+End. In addition, the status bar object in dialogs like that one did not have the proper role in LibreOffice yet. Description of user facing changes Status bar announcement for LibreOffice using the NVDA+End keyboard shortcut now also works for dialogs and with the upcoming LibreOffice version 24.2. Description of development approach LibreOffice is adapted to expose the proper role for the status bar in dialogs like the one mentioned above: https://gerrit.libreoffice.org/c/core/+/157659 The DIALOG and OPTIONPANE roles are now also considered by NVDA when traversing the a11y tree to find the status bar. In addition, the FRAME role is also taken into account, which is needed to support finding the status bar in the default application window with LibreOffice >= 24.2, see commit message of this LibreOffice change for more details: https://gerrit.libreoffice.org/c/core/+/157658 Add a check whether the statusbar children have the 'IAccessibleTextObject' member before accessing it.
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 #11698
Summary of the issue:
Announcement of the status bar in LibreOffice (e.g. triggered by NVDA+End) didn't work because the default implementations do not work for the LibreOffice case.
Description of user facing changes
Announcement of the status bar (e.g. triggered
by NVDA+End) works for LibreOffice.
Description of development approach
Override the default app module implementation to retrieve the status bar and announce its text in the LibreOffice app module, since the default implementations are not sufficient for the LibreOffice case:
To retrieve the status bar object, locate the descendant with the corresponding role, but only descend into children of role
ROOTPANEandWINDOWfor performance reasons.To generate text from the status bar object, retrieve the text of each status bar child using the IAccessibleText interface. (The default implementation in api.py only uses the object names and values, which are both empty.)
Testing strategy:
(e.g. something like "Page 1 of 1 5 words, 20 characters Default
Page Style English (United States) {en-US} 80%")
instead of Writer (in step 2)
Known issues with pull request:
none
Change log entries:
Changes
Announcement of the status bar (e.g. triggered by NVDA+End) works for LibreOffice. (#11698)Code Review Checklist: