Skip to content

Fix UnboundLocalError in _isUIAWindowHelper#12859

Merged
michaelDCurran merged 1 commit into
nvaccess:masterfrom
codeofdusk:fix-unbound-chromium
Sep 18, 2021
Merged

Fix UnboundLocalError in _isUIAWindowHelper#12859
michaelDCurran merged 1 commit into
nvaccess:masterfrom
codeofdusk:fix-unbound-chromium

Conversation

@codeofdusk

Copy link
Copy Markdown
Contributor

Link to issue number:

Fix-up of #12854.

Summary of the issue:

In #12854 the CanUseOlderInProcessApproach check was moved to run only when checking Office windows. However, it is also used to check whether to use UIA in Chromium.

Description of how this pull request fixes the issue:

Move this check before all usages, restoring the ability to use UIA in Chromium.

Testing strategy:

Verified the functionality of UIA Word and Edgium.

Known issues with pull request:

None.

Change log entries:

None.

Code Review Checklist:

  • Pull Request description:
    • description is up to date
    • change log entries
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • API is compatible with existing add-ons.
  • Documentation:
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English

@codeofdusk codeofdusk requested a review from a team as a code owner September 18, 2021 00:21
@codeofdusk

Copy link
Copy Markdown
Contributor Author

Cc @LeonarddeR.

@michaelDCurran michaelDCurran merged commit 0ab3234 into nvaccess:master Sep 18, 2021
@nvaccessAuto nvaccessAuto added this to the 2021.3 milestone Sep 18, 2021
@LeonarddeR

LeonarddeR commented Sep 18, 2021

Copy link
Copy Markdown
Collaborator

Sorry for missing this. I think we really should clean up this code. It's really tricky and errorprone.

Honestly, this is why I tend to avoid Python more and more. Having this kind of error pop up at runtime while it could easily be detected at compile time in other languages is just a shame!

michaelDCurran added a commit that referenced this pull request Oct 26, 2021
michaelDCurran added a commit that referenced this pull request Oct 27, 2021
We have tried to switch to using UI automation to access MS Word documents by default in NVDA 2021.3. However, there are still several issues remaining with our UIA support. Switching to UIA by default should be held back until these are addressed.
Some of these include:
• Support for math: Support mathML UIA custom property in MS Word #12946
• Reporting of line numbers: Requires UIA custom patterns support\
Over the last couple of months our UIA support has had a lot of fixes and improvements, mainly spured on by the apparent need to switch due to NVDA and MS Word not playing well together with the introduction of Modern Comments in MS Word build 13901. However, a work around has been found for #12982 now, making the swich less of a high priority.
Description of how this pull request fixes the issue:
Reverts #12859
Reverts #12854
Reverts #12770
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.

4 participants