Descend into children for dialog text for option pane (Fixes #11687)#12801
Conversation
|
This is the first time I'm trying to contribute to NVDA. I went through the documentation for contributing. For those items I haven't marked checked in the code review checklist, it's unclear to me whether those are relevant in this case, so please let me know in case anything is missing. |
See test results for failed build of commit 1283bb46de |
|
From what I can see, the failed flake8 check in the test is unrelated to my change, since the added line uses the same indentation as the following lines:
Should I adapt indentation for all lines in the commit or add a preparatory commit to change the indentation of the existing code and a separate commit to add the new line (to keep the diff in the "actual change" as small as possible)? |
|
Even if fixing only the tab number of the line you added should be enough to make the linting check pass, this makes sense to fix all the tabs for all the elements of the tuple to which you have added an element. |
This addresses a flake8 warning: > 1 ET126 (flake8-tabs) unexpected number of tabs at start of expression line (expected 4, got 5) into which I ran when adding another element to the tuple in a follow-up change.
As is done for objects of role 'controlTypes.Role.PANE'
also descend into children when retrieving the dialog text
from an object of role 'controlTypes.Role.OPTIONPANE'.
This is used e.g. in LibreOffice's message dialogs and
makes sure that the text in the dialogs is read out.
Note: In addition to this change in NVDA, it also requires
the following commit recently committed to LibreOffice [1]
(which will be contained in LibreOffice 7.3)
commit e29f80efc826fdc8a8e4b7cbdd3becf2f074cce4
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Wed Sep 1 16:25:01 2021 +0200
tdf#135588 wina11y: Map AccessibleRole::STATIC to ROLE_SYSTEM_STATICTEXT
Its commit message has some more background information.
Fixes nvaccess#11687
[1] https://git.libreoffice.org/core/+/e29f80efc826fdc8a8e4b7cbdd3becf2f074cce4%5E%21
ecfb714 to
de162c9
Compare
Thanks, I have added a preparatory commit to fix all tabs for the tuple before adding the new element in a separate commit. |
|
This looks ready for review. Considering that it would require a specific application (like Libre Office) to perform system tests, this can be ignored. The other unticked checkboxes are also not necessary for this sort of change. |
|
Thanks, I've marked this as ready for review now. |
LeonarddeR
left a comment
There was a problem hiding this comment.
Congrats with your first pr! Looks good to me.
|
Thanks! Is any further action needed from my side or should I just wait for the remaining missing reviews? |
See test results for failed build of commit 9e0602e08a |
Link to issue number:
Fixes #11687
Summary of the issue:
Text in LibreOffice message dialogs is not announced by NVDA.
Description of how this pull request fixes the issue:
This commit makes sure that the children of objects of role 'controlTypes.Role.OPTIONPANE' are taken into account when determining the text to announce for a dialog, as is done for objects of role 'controlTypes.Role.PANE'.
For LibreOffice (message) dialogs, the dialog text are objects of role 'controlTypes.Role.STATICTEXT' that are children of an object of type 'controlTypes.Role.OPTIONPANE'.
Those were previously not considered when determining the dialog text to announce. This change ensures that they are now and that the actual dialog text is thus announced by NVDA, just as is done (and has been the case) for objects of role 'controlTypes.Role.PANE'.
Note: In addition to this change in NVDA, it also requires
the following commit recently committed to LibreOffice [1]
(which will be contained in LibreOffice 7.3):
Its commit message has some more background information.
[1] https://git.libreoffice.org/core/+/e29f80efc826fdc8a8e4b7cbdd3becf2f074cce4%5E%21
Testing strategy:
Known issues with pull request:
none
Change log entries:
Changes
Dialog text from an object of role 'OPTIONPANE' is now retrieved by descending into the objects children. (#11687)
Code Review Checklist: