Skip to content

Descend into children for dialog text for option pane (Fixes #11687)#12801

Merged
michaelDCurran merged 4 commits into
nvaccess:masterfrom
michaelweghorn:michaelweghorn/tdf135588_nvda11687
Sep 14, 2021
Merged

Descend into children for dialog text for option pane (Fixes #11687)#12801
michaelDCurran merged 4 commits into
nvaccess:masterfrom
michaelweghorn:michaelweghorn/tdf135588_nvda11687

Conversation

@michaelweghorn

Copy link
Copy Markdown
Contributor

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):

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.

[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:

  • Pull Request description is up to date.
  • Unit tests.
  • System (end to end) tests.
  • Manual testing.
  • User Documentation.
  • Change log entry.
  • Context sensitive help for GUI changes.
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers

@michaelweghorn

Copy link
Copy Markdown
Contributor Author

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.

@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit 1283bb46de

@michaelweghorn

Copy link
Copy Markdown
Contributor Author

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:

source/NVDAObjects/behaviors.py:92:6: ET126 (flake8-tabs) unexpected number of tabs at start of expression line (expected 4, got 5)
controlTypes.ROLE_OPTIONPANE,
^
1 ET126 (flake8-tabs) unexpected number of tabs at start of expression line (expected 4, got 5)

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)?

@CyrilleB79

Copy link
Copy Markdown
Contributor

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
@michaelweghorn michaelweghorn force-pushed the michaelweghorn/tdf135588_nvda11687 branch from ecfb714 to de162c9 Compare September 2, 2021 13:55
@michaelweghorn

Copy link
Copy Markdown
Contributor Author

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.

Thanks, I have added a preparatory commit to fix all tabs for the tuple before adding the new element in a separate commit.

@seanbudd

seanbudd commented Sep 2, 2021

Copy link
Copy Markdown
Member

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.

@michaelweghorn michaelweghorn marked this pull request as ready for review September 3, 2021 06:17
@michaelweghorn michaelweghorn requested a review from a team as a code owner September 3, 2021 06:17
@michaelweghorn

Copy link
Copy Markdown
Contributor Author

Thanks, I've marked this as ready for review now.

@LeonarddeR LeonarddeR left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congrats with your first pr! Looks good to me.

@michaelweghorn

Copy link
Copy Markdown
Contributor Author

Thanks! Is any further action needed from my side or should I just wait for the remaining missing reviews?

@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit 9e0602e08a

@michaelDCurran michaelDCurran merged commit efb6141 into nvaccess:master Sep 14, 2021
@nvaccessAuto nvaccessAuto added this to the 2021.3 milestone Sep 14, 2021
@michaelweghorn michaelweghorn deleted the michaelweghorn/tdf135588_nvda11687 branch September 17, 2021 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LibreOffice Writer: in Confirm dialog in Document restore is not announced when using screenreaders

7 participants