Accessibility: Signaling Model #3439

Closed
opened 2026-01-30 23:21:15 +00:00 by claunia · 11 comments
Owner

Originally created by @carlos-zamora on GitHub (Aug 15, 2019).

Originally assigned to: @carlos-zamora on GitHub.

Description of the new feature/enhancement

UIA has signal events (link). ConHost supported them. WindowUiaProvider was an integral part to that.

Windows Terminal currently doesn't support them. We have some architecture in place to do so though.

Proposed technical implementation details (optional)

WindowUiaProvider already has the groundwork for that. It might be that we don't even need a WindowUiaProvider and just have XAML do some of it.

For reference, the signaling model for conhost was as follows:

<ConHost Event (i.e.: new text)>
--> Signal WindowUiaProvider
--> Signal ScreenInfoUiaProvider
--> Raise UiaAutomationEvent to Client

The client then responds to these events with more actions (i.e.: recreate object, etc...)

EDIT: The functionality for signaling includes...

  • Selection Events (selection changed) PR
  • Text Buffer Events (new output)
  • Scroll Events

I may possible need...

  • Resize events
  • Cursor Events
Originally created by @carlos-zamora on GitHub (Aug 15, 2019). Originally assigned to: @carlos-zamora on GitHub. # Description of the new feature/enhancement UIA has signal events ([link](https://docs.microsoft.com/en-us/windows/win32/winauto/uiauto-event-ids)). ConHost supported them. WindowUiaProvider was an integral part to that. Windows Terminal currently doesn't support them. We have some architecture in place to do so though. # Proposed technical implementation details (optional) WindowUiaProvider already has the groundwork for that. It might be that we don't even need a WindowUiaProvider and just have XAML do some of it. For reference, the signaling model for conhost was as follows: <ConHost Event (i.e.: new text)> --> Signal WindowUiaProvider --> Signal ScreenInfoUiaProvider --> Raise UiaAutomationEvent to Client The client then responds to these events with more actions (i.e.: recreate object, etc...) EDIT: The functionality for signaling includes... - [x] Selection Events (selection changed) [PR](https://github.com/microsoft/terminal/pull/2989) - [ ] Text Buffer Events (new output) - [ ] Scroll Events I may possible need... - [ ] Resize events - [ ] Cursor Events
Author
Owner

@codeofdusk commented on GitHub (Sep 30, 2019):

Blocking nvaccess/nvda#10305.

@codeofdusk commented on GitHub (Sep 30, 2019): Blocking nvaccess/nvda#10305.
Author
Owner

@carlos-zamora commented on GitHub (Mar 6, 2020):

@codeofdusk @michaelDCurran @leonardder
CC @DHowett-MSFT

I've attached a release x64 build of dev/cazamor/acc/sig/output. I'll be working off of that branch to get automation events working for output. The changes are pretty naive but simple: whenever we need to render new content to the screen, fire a TextChanged automation event.

For something as simple as echo hello, I can see that some degenerate ranges are created at the end of the written command, then at the end of the prompt after the command has been executed. However, it seems like a range connecting both points is never actually created and read.

Are you expecting a different Automation Event? Do I need to configure my TermControlAutomationPeer any further, maybe? Let me know what's going on from your end :)

NOTE: you'll have to run WindowsTerminal.exe here, NOT OpenConsole.exe. ConHost has not been switched over to the new signaling model yet, whereas Windows Terminal has.

WT_signal_output.zip

@carlos-zamora commented on GitHub (Mar 6, 2020): @codeofdusk @michaelDCurran @leonardder CC @DHowett-MSFT I've attached a release x64 build of `dev/cazamor/acc/sig/output`. I'll be working off of that branch to get automation events working for output. The changes are pretty naive but simple: whenever we need to render new content to the screen, fire a TextChanged automation event. For something as simple as `echo hello`, I can see that some degenerate ranges are created at the end of the written command, then at the end of the prompt after the command has been executed. However, it seems like a range connecting both points is never actually created and read. Are you expecting a different Automation Event? Do I need to configure my TermControlAutomationPeer any further, maybe? Let me know what's going on from your end :) NOTE: you'll have to run WindowsTerminal.exe here, NOT OpenConsole.exe. ConHost has not been switched over to the new signaling model yet, whereas Windows Terminal has. [WT_signal_output.zip](https://github.com/microsoft/terminal/files/4299459/WT_signal_output.zip)
Author
Owner

@codeofdusk commented on GitHub (Mar 6, 2020):

@codeofdusk @michaelDCurran @leonardder
CC @DHowett-MSFT

I've attached a release x64 build of dev/cazamor/acc/sig/output. I'll be working off of that branch to get automation events working for output. The changes are pretty naive but simple: whenever we need to render new content to the screen, fire a TextChanged automation event.

For something as simple as echo hello, I can see that some degenerate ranges are created at the end of the written command, then at the end of the prompt after the command has been executed. However, it seems like a range connecting both points is never actually created and read.

Are you expecting a different Automation Event? Do I need to configure my TermControlAutomationPeer any further, maybe? Let me know what's going on from your end :)

NOTE: you'll have to run WindowsTerminal.exe here, NOT OpenConsole.exe. ConHost has not been switched over to the new signaling model yet, whereas Windows Terminal has.

WT_signal_output.zip

Thanks @carlos-zamora This looks sufficient for implementing terminal support in NVDA. Things are mostly working (see nvaccess/nvda#10784), except we're getting doubled characters when typing (but I think I know where the issue is, and it's on our side). Are there plans to have this merged soon?

@codeofdusk commented on GitHub (Mar 6, 2020): > @codeofdusk @michaelDCurran @leonardder > CC @DHowett-MSFT > > I've attached a release x64 build of `dev/cazamor/acc/sig/output`. I'll be working off of that branch to get automation events working for output. The changes are pretty naive but simple: whenever we need to render new content to the screen, fire a TextChanged automation event. > > For something as simple as `echo hello`, I can see that some degenerate ranges are created at the end of the written command, then at the end of the prompt after the command has been executed. However, it seems like a range connecting both points is never actually created and read. > > Are you expecting a different Automation Event? Do I need to configure my TermControlAutomationPeer any further, maybe? Let me know what's going on from your end :) > > NOTE: you'll have to run WindowsTerminal.exe here, NOT OpenConsole.exe. ConHost has not been switched over to the new signaling model yet, whereas Windows Terminal has. > > [WT_signal_output.zip](https://github.com/microsoft/terminal/files/4299459/WT_signal_output.zip) Thanks @carlos-zamora This looks sufficient for implementing terminal support in NVDA. Things are mostly working (see nvaccess/nvda#10784), except we're getting doubled characters when typing (but I think I know where the issue is, and it's on our side). Are there plans to have this merged soon?
Author
Owner

@carlos-zamora commented on GitHub (Mar 6, 2020):

@codeofdusk @michaelDCurran @leonardder
CC @DHowett-MSFT
I've attached a release x64 build of dev/cazamor/acc/sig/output. I'll be working off of that branch to get automation events working for output. The changes are pretty naive but simple: whenever we need to render new content to the screen, fire a TextChanged automation event.
For something as simple as echo hello, I can see that some degenerate ranges are created at the end of the written command, then at the end of the prompt after the command has been executed. However, it seems like a range connecting both points is never actually created and read.
Are you expecting a different Automation Event? Do I need to configure my TermControlAutomationPeer any further, maybe? Let me know what's going on from your end :)
NOTE: you'll have to run WindowsTerminal.exe here, NOT OpenConsole.exe. ConHost has not been switched over to the new signaling model yet, whereas Windows Terminal has.
WT_signal_output.zip

Thanks @carlos-zamora This looks sufficient for implementing terminal support in NVDA. Things are mostly working (see nvaccess/nvda#10784), except we're getting doubled characters when typing (but I think I know where the issue is, and it's on our side). Are there plans to have this merged soon?

If I can get it working for Narrator too, that'd be ideal. But, I guess there's no harm in merging what I have then iterating on master. I'll submit a PR today then. Thanks!

@carlos-zamora commented on GitHub (Mar 6, 2020): > > @codeofdusk @michaelDCurran @leonardder > > CC @DHowett-MSFT > > I've attached a release x64 build of `dev/cazamor/acc/sig/output`. I'll be working off of that branch to get automation events working for output. The changes are pretty naive but simple: whenever we need to render new content to the screen, fire a TextChanged automation event. > > For something as simple as `echo hello`, I can see that some degenerate ranges are created at the end of the written command, then at the end of the prompt after the command has been executed. However, it seems like a range connecting both points is never actually created and read. > > Are you expecting a different Automation Event? Do I need to configure my TermControlAutomationPeer any further, maybe? Let me know what's going on from your end :) > > NOTE: you'll have to run WindowsTerminal.exe here, NOT OpenConsole.exe. ConHost has not been switched over to the new signaling model yet, whereas Windows Terminal has. > > [WT_signal_output.zip](https://github.com/microsoft/terminal/files/4299459/WT_signal_output.zip) > > Thanks @carlos-zamora This looks sufficient for implementing terminal support in NVDA. Things are mostly working (see [nvaccess/nvda#10784](https://github.com/nvaccess/nvda/pull/10784)), except we're getting doubled characters when typing (but I think I know where the issue is, and it's on our side). Are there plans to have this merged soon? If I can get it working for Narrator too, that'd be ideal. But, I guess there's no harm in merging what I have then iterating on master. I'll submit a PR today then. Thanks!
Author
Owner

@codeofdusk commented on GitHub (Mar 6, 2020):

@codeofdusk @michaelDCurran @leonardder
CC @DHowett-MSFT
I've attached a release x64 build of dev/cazamor/acc/sig/output. I'll be working off of that branch to get automation events working for output. The changes are pretty naive but simple: whenever we need to render new content to the screen, fire a TextChanged automation event.
For something as simple as echo hello, I can see that some degenerate ranges are created at the end of the written command, then at the end of the prompt after the command has been executed. However, it seems like a range connecting both points is never actually created and read.
Are you expecting a different Automation Event? Do I need to configure my TermControlAutomationPeer any further, maybe? Let me know what's going on from your end :)
NOTE: you'll have to run WindowsTerminal.exe here, NOT OpenConsole.exe. ConHost has not been switched over to the new signaling model yet, whereas Windows Terminal has.
WT_signal_output.zip

Thanks @carlos-zamora This looks sufficient for implementing terminal support in NVDA. Things are mostly working (see nvaccess/nvda#10784), except we're getting doubled characters when typing (but I think I know where the issue is, and it's on our side). Are there plans to have this merged soon?

If I can get it working for Narrator too, that'd be ideal. But, I guess there's no harm in merging what I have then iterating on master. I'll submit a PR today then. Thanks!

I've tested with Narrator and observed, as you did, that we aren't getting new text announcements.

In NVDA, we have an NVDAObjects.behaviors.LiveText class that waits for text change events from various APIs (such as UIA), diffs the current text against the last-reported text, and speaks the changes. Does Narrator have a similar paraddigm for consoles?

@codeofdusk commented on GitHub (Mar 6, 2020): > > > @codeofdusk @michaelDCurran @leonardder > > > CC @DHowett-MSFT > > > I've attached a release x64 build of `dev/cazamor/acc/sig/output`. I'll be working off of that branch to get automation events working for output. The changes are pretty naive but simple: whenever we need to render new content to the screen, fire a TextChanged automation event. > > > For something as simple as `echo hello`, I can see that some degenerate ranges are created at the end of the written command, then at the end of the prompt after the command has been executed. However, it seems like a range connecting both points is never actually created and read. > > > Are you expecting a different Automation Event? Do I need to configure my TermControlAutomationPeer any further, maybe? Let me know what's going on from your end :) > > > NOTE: you'll have to run WindowsTerminal.exe here, NOT OpenConsole.exe. ConHost has not been switched over to the new signaling model yet, whereas Windows Terminal has. > > > [WT_signal_output.zip](https://github.com/microsoft/terminal/files/4299459/WT_signal_output.zip) > > > > > > Thanks @carlos-zamora This looks sufficient for implementing terminal support in NVDA. Things are mostly working (see [nvaccess/nvda#10784](https://github.com/nvaccess/nvda/pull/10784)), except we're getting doubled characters when typing (but I think I know where the issue is, and it's on our side). Are there plans to have this merged soon? > > If I can get it working for Narrator too, that'd be ideal. But, I guess there's no harm in merging what I have then iterating on master. I'll submit a PR today then. Thanks! I've tested with Narrator and observed, as you did, that we aren't getting new text announcements. In NVDA, we have an `NVDAObjects.behaviors.LiveText` class that waits for text change events from various APIs (such as UIA), diffs the current text against the last-reported text, and speaks the changes. Does Narrator have a similar paraddigm for consoles?
Author
Owner

@carlos-zamora commented on GitHub (Mar 6, 2020):

@codeofdusk @michaelDCurran @leonardder
CC @DHowett-MSFT
I've attached a release x64 build of dev/cazamor/acc/sig/output. I'll be working off of that branch to get automation events working for output. The changes are pretty naive but simple: whenever we need to render new content to the screen, fire a TextChanged automation event.
For something as simple as echo hello, I can see that some degenerate ranges are created at the end of the written command, then at the end of the prompt after the command has been executed. However, it seems like a range connecting both points is never actually created and read.
Are you expecting a different Automation Event? Do I need to configure my TermControlAutomationPeer any further, maybe? Let me know what's going on from your end :)
NOTE: you'll have to run WindowsTerminal.exe here, NOT OpenConsole.exe. ConHost has not been switched over to the new signaling model yet, whereas Windows Terminal has.
WT_signal_output.zip

Thanks @carlos-zamora This looks sufficient for implementing terminal support in NVDA. Things are mostly working (see nvaccess/nvda#10784), except we're getting doubled characters when typing (but I think I know where the issue is, and it's on our side). Are there plans to have this merged soon?

If I can get it working for Narrator too, that'd be ideal. But, I guess there's no harm in merging what I have then iterating on master. I'll submit a PR today then. Thanks!

I've tested with Narrator and observed, as you did, that we aren't getting new text announcements.

In NVDA, we have an NVDAObjects.behaviors.LiveText class that waits for text change events from various APIs (such as UIA), diffs the current text against the last-reported text, and speaks the changes. Does Narrator have a similar paraddigm for consoles?

Not sure. Their code can be a bit complicated haha. I'm working with one of their devs to get a better look. I'm hoping that it can get fixed by next week because we're definitely VERY close.

@carlos-zamora commented on GitHub (Mar 6, 2020): > > > > @codeofdusk @michaelDCurran @leonardder > > > > CC @DHowett-MSFT > > > > I've attached a release x64 build of `dev/cazamor/acc/sig/output`. I'll be working off of that branch to get automation events working for output. The changes are pretty naive but simple: whenever we need to render new content to the screen, fire a TextChanged automation event. > > > > For something as simple as `echo hello`, I can see that some degenerate ranges are created at the end of the written command, then at the end of the prompt after the command has been executed. However, it seems like a range connecting both points is never actually created and read. > > > > Are you expecting a different Automation Event? Do I need to configure my TermControlAutomationPeer any further, maybe? Let me know what's going on from your end :) > > > > NOTE: you'll have to run WindowsTerminal.exe here, NOT OpenConsole.exe. ConHost has not been switched over to the new signaling model yet, whereas Windows Terminal has. > > > > [WT_signal_output.zip](https://github.com/microsoft/terminal/files/4299459/WT_signal_output.zip) > > > > > > > > > Thanks @carlos-zamora This looks sufficient for implementing terminal support in NVDA. Things are mostly working (see [nvaccess/nvda#10784](https://github.com/nvaccess/nvda/pull/10784)), except we're getting doubled characters when typing (but I think I know where the issue is, and it's on our side). Are there plans to have this merged soon? > > > > > > If I can get it working for Narrator too, that'd be ideal. But, I guess there's no harm in merging what I have then iterating on master. I'll submit a PR today then. Thanks! > > I've tested with Narrator and observed, as you did, that we aren't getting new text announcements. > > In NVDA, we have an `NVDAObjects.behaviors.LiveText` class that waits for text change events from various APIs (such as UIA), diffs the current text against the last-reported text, and speaks the changes. Does Narrator have a similar paraddigm for consoles? Not sure. Their code can be a bit complicated haha. I'm working with one of their devs to get a better look. I'm hoping that it can get fixed by next week because we're definitely VERY close.
Author
Owner

@LeonarddeR commented on GitHub (Mar 6, 2020):

If narrator doesn't use a diffing method like NVDA does, the only alternative I can think of is making the terminal a live region. Pretty sure it doesn't work like this, though, as it has several drawbacks.

@LeonarddeR commented on GitHub (Mar 6, 2020): If narrator doesn't use a diffing method like NVDA does, the only alternative I can think of is making the terminal a live region. Pretty sure it doesn't work like this, though, as it has several drawbacks.
Author
Owner

@LeonarddeR commented on GitHub (Mar 6, 2020):

Ah and in theory, UIA notification events could be used as well. If they are fired by conhost, NVDA would ignore them as NVDA only speaks notification events fire by the foreground application.

@LeonarddeR commented on GitHub (Mar 6, 2020): Ah and in theory, UIA notification events could be used as well. If they are fired by conhost, NVDA would ignore them as NVDA only speaks notification events fire by the foreground application.
Author
Owner

@codeofdusk commented on GitHub (Mar 9, 2020):

But, I guess there's no harm in merging what I have then iterating on master.

@carlos-zamora Do you still plan to do this?

@codeofdusk commented on GitHub (Mar 9, 2020): > But, I guess there's no harm in merging what I have then iterating on master. @carlos-zamora Do you still plan to do this?
Author
Owner

@carlos-zamora commented on GitHub (Mar 9, 2020):

But, I guess there's no harm in merging what I have then iterating on master.

@carlos-zamora Do you still plan to do this?

Yup! Here it is: https://github.com/microsoft/terminal/pull/4826

@carlos-zamora commented on GitHub (Mar 9, 2020): > > But, I guess there's no harm in merging what I have then iterating on master. > > @carlos-zamora Do you still plan to do this? Yup! Here it is: https://github.com/microsoft/terminal/pull/4826
Author
Owner

@ghost commented on GitHub (Apr 22, 2020):

:tada:This issue was addressed in #4826, which has now been successfully released as Windows Terminal Preview v0.11.1121.0.🎉

Handy links:

@ghost commented on GitHub (Apr 22, 2020): :tada:This issue was addressed in #4826, which has now been successfully released as `Windows Terminal Preview v0.11.1121.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v0.11.1121.0) * [Store Download](https://www.microsoft.com/store/apps/9n0dx20hk701?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#3439