Skip to content

Add support for IE and Edge wxWebView controls#18877

Merged
seanbudd merged 4 commits into
nvaccess:masterfrom
LeonarddeR:webview2
Sep 12, 2025
Merged

Add support for IE and Edge wxWebView controls#18877
seanbudd merged 4 commits into
nvaccess:masterfrom
LeonarddeR:webview2

Conversation

@LeonarddeR

Copy link
Copy Markdown
Collaborator

Link to issue number:

Fixes #17273

Summary of the issue:

NVDA has focus issues in WX Web View controls.

Description of user facing changes:

WX Web View controls in applications will no enter browse mode correctly.

Description of developer facing changes:

None

Description of development approach:

There are actually two approaches, one for every known supported backend on Windows:

  1. For IE, find the inner Internet Explorer server window and focus it. It will never get focus automatically, so this is the fix with the greatest positive impact.
  2. For Edge WebView2, wait for the Chrome_RenderWidgetHostHWND window to be created, and refocus the webview after creation. Refocussing the webview again will properly propagate focus to the Edge Web view, at least on recent wx.

Testing strategy:

Test test script from #17273. Ensure to test the IE and Edge backends.

Known issues with pull request:

Edge Web View 2 sometimes loads with UIA browse mode, then quickly switches back to IA2 when pressing tab. I don't think this issue is related to the current fix, though.

Code Review Checklist:

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

Copilot AI review requested due to automatic review settings September 5, 2025 22:16
@LeonarddeR LeonarddeR requested a review from a team as a code owner September 5, 2025 22:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for NVDA to properly handle focus in wxWebView controls that use either Internet Explorer or Edge WebView2 backends. The fix ensures that browse mode is correctly activated in these web view controls.

Key changes:

  • Adds specific focus handling for IE-based wxWebView controls by finding and focusing the inner Internet Explorer_Server window
  • Implements focus handling for Edge WebView2 controls by waiting for the Chrome_RenderWidgetHostHWND window creation and refocusing
  • Integrates the new wxWebView support into the IAccessible object system

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
user_docs/en/changes.md Adds changelog entry documenting the fix for wxWebView controls
source/NVDAObjects/IAccessible/wx.py New module implementing WxWebView class with backend-specific focus handling
source/NVDAObjects/IAccessible/init.py Integrates wx objects into the IAccessible overlay system

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread source/NVDAObjects/IAccessible/wx.py
Comment thread source/NVDAObjects/IAccessible/wx.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread source/NVDAObjects/IAccessible/wx.py Outdated
Comment thread source/NVDAObjects/IAccessible/wx.py Outdated
@seanbudd seanbudd added the conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review. label Sep 8, 2025
@seanbudd seanbudd merged commit 7ad8fef into nvaccess:master Sep 12, 2025
40 checks passed
@github-actions github-actions Bot added this to the 2026.1 milestone Sep 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Browse mode does not activate, and is not available, in wx.html2.WebView instances

3 participants