UI Automation in Windows Console and Windows Terminal: block SV2M2 notification events for now and preserve accessibility after UIA class name change (#13261)
Link to issue number:
Related to microsoft/terminal#12358 among others (to be released).
Summary of the issue:
In upcoming Windows Terminal and Windows Console, UIA notification events will be sent when new text is inserted (i.e. for text output) to improve Narrator support. This will result in double-reporting of all terminal output: once from LiveText and once from UIA notifications (but without appropriate filtering for typed characters/passwords etc).
As part of the implementation of notifications, I asked Microsoft to change the UIA class name to allow new terminal support (including notifications) in a follow-up NVDA PR, since notifications will require a departure from the terminal strategy used by NVDA in the past. Changing the class name will break NVDA's current ability to identify the terminal and implement accessibility.
Description of how this pull request fixes the issue:
Suppress any received UIA notification events in UIA console and terminal for now, but log them for development.
Support the new UIA class name used by terminals that send notifications.
Ideally, NVDA would use these events in place of LiveText. If we could get away without registering for TextChange at all, this could be an extreme stability improvement in the terminal as #11002 would be completely circumvented. Also, having new text pushed to us (instead of having to diff) should improve performance considerably in high-volume scenarios.