Skip to content

Fix error in UIA focus event handler when NVDAObject can't be created#14314

Merged
michaelDCurran merged 1 commit into
masterfrom
fixUIAFocusEventError
Oct 31, 2022
Merged

Fix error in UIA focus event handler when NVDAObject can't be created#14314
michaelDCurran merged 1 commit into
masterfrom
fixUIAFocusEventError

Conversation

@michaelDCurran

Copy link
Copy Markdown
Member

Link to issue number:

Fix regression introduced in pr #14256

Summary of the issue:

Sometimes a UIA focus event handler can't create an NVDAObject for the element being focused. Normally, in this situation, the event would be silently dropped.
However, with the introduction of extra debugging for UIA events in pr #14256, a return was accidently removed, which meant that the shouldAllowUIAFocusEvent attribute tried to be looed up on the None (failed NVDAObject). This caused a noisy traceback in the log at level error.

Description of user facing changes

A noisy error traceback is no longer produced when NVDA cannot handle certain broken UIA focus events.

Description of development approach

Make sure to return if instantiating the NVDAObject produces None.

Testing strategy:

Run NVDA for an hour or so performing normal daily tasks. Previously the error would have been seen multiple times.

Known issues with pull request:

None known.

Change log entries:

None needed - regression only in master.
New features
Changes
Bug fixes
For Developers

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
  • Security precautions taken.

@michaelDCurran michaelDCurran requested a review from a team as a code owner October 31, 2022 03:41
@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit 5dacdb4fe1

@michaelDCurran michaelDCurran merged commit 2bfc3c2 into master Oct 31, 2022
@michaelDCurran michaelDCurran deleted the fixUIAFocusEventError branch October 31, 2022 06:26
@nvaccessAuto nvaccessAuto added this to the 2023.1 milestone Oct 31, 2022
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