Skip to content

No longer classify (rich) edit classes as bad for UIA#15314

Merged
seanbudd merged 4 commits into
nvaccess:masterfrom
LeonarddeR:richEdit
Aug 21, 2023
Merged

No longer classify (rich) edit classes as bad for UIA#15314
seanbudd merged 4 commits into
nvaccess:masterfrom
LeonarddeR:richEdit

Conversation

@LeonarddeR

Copy link
Copy Markdown
Collaborator

Link to issue number:

Fixes #14285

Summary of the issue:

There are reports of NVDA being sluggish in Rich Edit controls. In d5a3383bb2, rich edit classes were classified as bad for UIA for us to always use the win32 implementation. However, our support for UIA text editing is good enough for this restriction to be lifted, as this also solves the reported sluggishness.

Description of user facing changes

Using UIA instead of win32 API's under the hood.

Description of development approach

  • Moved the role, value and states overrides to a base class in window.edit
  • Rather than simply removing win32 edit classes when using UIA, insert the EditBase class as well. This ensures that role is reported as editable text rather than document, and that the multiline state is added. This ensures backwards compatibility as long as code authors don't match against MSAA specific properties.

Testing strategy:

Known issues with pull request:

I'm not sure whether we should consider this API breaking. In theory, an app module could use IAccessible specific properties to match against a specific implementation of a control, but I think this risk is negligible.

Change log entries:

Changes

  • Rich Edit controls in applications such as Wordpad now use UI Automation (UIA) when the application advertises native support for this.
    Bug fixes
  • NVDA will now longer be sluggish in rich edit controls when braille is enabled, such as in MemPad. (Lagging navigation and typing in RichEdit50W controls #14285)

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.

@LeonarddeR LeonarddeR requested a review from a team as a code owner August 19, 2023 14:55
@LeonarddeR LeonarddeR requested a review from seanbudd August 19, 2023 14:55
@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit 1fb6626c5f

@seanbudd seanbudd merged commit 7bbf168 into nvaccess:master Aug 21, 2023
@nvaccessAuto nvaccessAuto added this to the 2023.3 milestone Aug 21, 2023
seanbudd pushed a commit that referenced this pull request Sep 6, 2023
Reintroduces #14285
Fixes #15375
Fixes #15330
Reverts #15314

Summary of the issue:
In #15314, edit and rich edit classes were no longer classified as bad for UIA. This caused the following issues:

Read only edit fields in Explorer no longer read correctly, as they inherrit from both UIA and IAccessible
UIA adds a redundant name of RichEdit Control to RichEdit controls.
Generally spoken, removing these classes from the bad UIA classes list meant an API breaking change because Edit objects using UIA instead of legacy Edit support behave differently with regard to overriding and filtering texts, including LTR and RTL marks.

Description of user facing changes
Reverted #15314. Most notably, the lag as reported in #14285 will unfortunately be reintroduced for now.

Description of development approach
Re-add the bad UIA class names again.
Addressed issues in the explorer appmodule as pointed out in Edit controls in explorer fail when they have a native UIA implementation #15375.
Most notably, changed class inheritance from IAccessible to Edit
Added some small checks to overlay selection to ensure SysListView overlays won't be added on SysListView objects that don't use MSAA
@LeonarddeR LeonarddeR deleted the richEdit branch August 23, 2025 06:28
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.

Lagging navigation and typing in RichEdit50W controls

4 participants