native equivalent of aria-live with NVDA


Florian Beijers
 

Hi,

I am a web developer first and foremost, and don't have a huge amount
of experience interacting with UIA and friends directly, so this is
really me looking for an analog to the concept I know.
Is there a pattern for the web concept of aria-live, where a
particular element on screen immediately echoes new text, but only the
new text, to NVDA as it comes in?
Think new messages in a chat window, new output for a terminal
program, that kind of thing.
If so, is there an example in some NVDA addon, guide, post or email
thread where I can see how this is done?

Thanks,
Florian


 

Hi,
I think you might be thinking of live region change event. I don't know if any add-ons are listening to this event more actively, but I do log UIA live region events in Windows 10 App Essentials.
Cheers,
Joseph

-----Original Message-----
From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Florian Beijers
Sent: Saturday, May 1, 2021 12:20 PM
To: nvda-addons@nvda-addons.groups.io
Subject: [nvda-addons] native equivalent of aria-live with NVDA

Hi,

I am a web developer first and foremost, and don't have a huge amount of experience interacting with UIA and friends directly, so this is really me looking for an analog to the concept I know.
Is there a pattern for the web concept of aria-live, where a particular element on screen immediately echoes new text, but only the new text, to NVDA as it comes in?
Think new messages in a chat window, new output for a terminal program, that kind of thing.
If so, is there an example in some NVDA addon, guide, post or email thread where I can see how this is done?

Thanks,
Florian


Florian Beijers
 

Hi,

That might very well be what it is, yes. I would like to break into addon development and remember getting somewhat stuck in the minutiae during my last attempt. I will keep this event in mine when I try again in the coming days. Veering off-topic for a hot second, is the addon dev guide still the place to be for people who'd like to get started, and if so, is there a natural next step after it?
Still really interested in the original topic of this email, I was thinking of for example Nick Stockton's IF Interpreters addon, but I'm not sure to what degree that addon does things in a standard way, so was looking for more examples to compare the ways of working as it were.

Thanks,
Florian

Op za 1 mei 2021 om 21:27 schreef Joseph Lee <joseph.lee22590@...>:

Hi,
I think you might be thinking of live region change event. I don't know if any add-ons are listening to this event more actively, but I do log UIA live region events in Windows 10 App Essentials.
Cheers,
Joseph

-----Original Message-----
From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Florian Beijers
Sent: Saturday, May 1, 2021 12:20 PM
To: nvda-addons@nvda-addons.groups.io
Subject: [nvda-addons] native equivalent of aria-live with NVDA

Hi,

I am a web developer first and foremost, and don't have a huge amount of experience interacting with UIA and friends directly, so this is really me looking for an analog to the concept I know.
Is there a pattern for the web concept of aria-live, where a particular element on screen immediately echoes new text, but only the new text, to NVDA as it comes in?
Think new messages in a chat window, new output for a terminal program, that kind of thing.
If so, is there an example in some NVDA addon, guide, post or email thread  where I can see how this is done?

Thanks,
Florian











James Scholes
 

As I often find myself saying on this list, it will help greatly if you described what you're trying to do. The context really matters here. For example:

1. If you're trying to develop or modify a Windows app to fire screen reader announcements, UIA does support a very similar concept to an ARIA live region. The technologies used to implement that app will determine how easily you can gain access to the functionality, e.g. in a .NET WinForms app it's as easy as adding a control to a form and setting its text. In a wxPython app, not so much.
2. If you just want your add-on to say something, import ui and use ui.message.
3. If you're developing an add-on for an application with an updating stream of text, like a console-style interaction, and you want NVDA to automatically speak text as it comes in, there are ways to do that which I've never quite managed to get my head around. Try NVDAObjects.window.DisplayModelLiveText as a starting point.

Regards,

James Scholes

On 01/05/2021 at 2:20 pm, Florian Beijers wrote:
Hi,

I am a web developer first and foremost, and don't have a huge amount
of experience interacting with UIA and friends directly, so this is
really me looking for an analog to the concept I know.
Is there a pattern for the web concept of aria-live, where a
particular element on screen immediately echoes new text, but only the
new text, to NVDA as it comes in?
Think new messages in a chat window, new output for a terminal
program, that kind of thing.
If so, is there an example in some NVDA addon, guide, post or email
thread where I can see how this is done?

Thanks,
Florian





 

Hi,

Yes, add-on dev guide is still considered an authority on add-on development. I expect the guide will be updated once 2021.1 beta ships.

Cheers,

Joseph

 

From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Florian Beijers
Sent: Saturday, May 1, 2021 12:46 PM
To: nvda-addons@nvda-addons.groups.io
Subject: Re: [nvda-addons] native equivalent of aria-live with NVDA

 

Hi,

 

That might very well be what it is, yes. I would like to break into addon development and remember getting somewhat stuck in the minutiae during my last attempt. I will keep this event in mine when I try again in the coming days. Veering off-topic for a hot second, is the addon dev guide still the place to be for people who'd like to get started, and if so, is there a natural next step after it?

Still really interested in the original topic of this email, I was thinking of for example Nick Stockton's IF Interpreters addon, but I'm not sure to what degree that addon does things in a standard way, so was looking for more examples to compare the ways of working as it were.

 

Thanks,

Florian

 

Op za 1 mei 2021 om 21:27 schreef Joseph Lee <joseph.lee22590@...>:

Hi,
I think you might be thinking of live region change event. I don't know if any add-ons are listening to this event more actively, but I do log UIA live region events in Windows 10 App Essentials.
Cheers,
Joseph

-----Original Message-----
From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Florian Beijers
Sent: Saturday, May 1, 2021 12:20 PM
To: nvda-addons@nvda-addons.groups.io
Subject: [nvda-addons] native equivalent of aria-live with NVDA

Hi,

I am a web developer first and foremost, and don't have a huge amount of experience interacting with UIA and friends directly, so this is really me looking for an analog to the concept I know.
Is there a pattern for the web concept of aria-live, where a particular element on screen immediately echoes new text, but only the new text, to NVDA as it comes in?
Think new messages in a chat window, new output for a terminal program, that kind of thing.
If so, is there an example in some NVDA addon, guide, post or email thread  where I can see how this is done?

Thanks,
Florian










James Scholes
 

I found some old code that uses the live text display model, if it helps. Something like this inside your app module:

def chooseNVDAObjectOverlayClasses(self, obj, clsList):
if some condition to determine if obj is the area you want to make live:
clsList.insert(0, DisplayModelLiveText)

You can also subclass DisplayModelLiveText to implement custom line processing and then insert your subclass instead. E.g. override initOverlayClass, _reportNewText, etc.

Regards,

James Scholes

On 01/05/2021 at 2:57 pm, James Scholes wrote:
As I often find myself saying on this list, it will help greatly if you described what you're trying to do. The context really matters here. For example:

1. If you're trying to develop or modify a Windows app to fire screen reader announcements, UIA does support a very similar concept to an ARIA live region. The technologies used to implement that app will determine how easily you can gain access to the functionality, e.g. in a .NET WinForms app it's as easy as adding a control to a form and setting its text. In a wxPython app, not so much.
2. If you just want your add-on to say something, import ui and use ui.message.
3. If you're developing an add-on for an application with an updating stream of text, like a console-style interaction, and you want NVDA to automatically speak text as it comes in, there are ways to do that which I've never quite managed to get my head around. Try NVDAObjects.window.DisplayModelLiveText as a starting point.

Regards,

James Scholes

On 01/05/2021 at 2:20 pm, Florian Beijers wrote:
Hi,

I am a web developer first and foremost, and don't have a huge amount
of experience interacting with UIA and friends directly, so this is
really me looking for an analog to the concept I know.
Is there a pattern for the web concept of aria-live, where a
particular element on screen immediately echoes new text, but only the
new text, to NVDA as it comes in?
Think new messages in a chat window, new output for a terminal
program, that kind of thing.
If so, is there an example in some NVDA addon, guide, post or email
thread where I can see how this is done?

Thanks,
Florian





Florian Beijers
 

It is hard to really specify the exact level of abstraction because of my almost complete unfamiliarity with the way NVDA currently handles cases like this, as well as my unfamiliarity with the way UIA and friends handle cases like this. I'd say that your third case comes closest to what I am trying to do. Scenarios like:

- Given object X in the object navigation hierarchy, report any new text that is appended to the inner text of the object proactively.
- Given collection object Y in the object navigation hierarchy, look at any new incoming children and report their inner text, if any.
- Given non-focused object Z, monitor for changes in it's content or state and report based on a condition when either of these change.

A lot of apps do things you need to know about outside of the object you're currently focused on, but the way this is done is always different, which makes it hard to specifically ask a "how to do XYZ" question, as it were.
Your example looks promising for some of these scenarios though, I'll have a look at it, thanks.
Florian


Op za 1 mei 2021 om 21:57 schreef James Scholes <james@...>:

As I often find myself saying on this list, it will help greatly if you described what you're trying to do.  The context really matters here.  For example:

1. If you're trying to develop or modify a Windows app to fire screen reader announcements, UIA does support a very similar concept to an ARIA live region.  The technologies used to implement that app will determine how easily you can gain access to the functionality, e.g. in a .NET WinForms app it's as easy as adding a control to a form and setting its text.  In a wxPython app, not so much.
2. If you just want your add-on to say something, import ui and use ui.message.
3. If you're developing an add-on for an application with an updating stream of text, like a console-style interaction, and you want NVDA to automatically speak text as it comes in, there are ways to do that which I've never quite managed to get my head around.  Try NVDAObjects.window.DisplayModelLiveText as a starting point.

Regards,

James Scholes

On 01/05/2021 at 2:20 pm, Florian Beijers wrote:
> Hi,
>
> I am a web developer first and foremost, and don't have a huge amount
> of experience interacting with UIA and friends directly, so this is
> really me looking for an analog to the concept I know.
> Is there a pattern for the web concept of aria-live, where a
> particular element on screen immediately echoes new text, but only the
> new text, to NVDA as it comes in?
> Think new messages in a chat window, new output for a terminal
> program, that kind of thing.
> If so, is there an example in some NVDA addon, guide, post or email
> thread  where I can see how this is done?
>
> Thanks,
> Florian
>
>
>
>
>






Noelia Ruiz
 

Hello, following this thread, I think you may find useful to look at
these examples:

https://github.com/nvaccess/nvda/blob/master/source/appModules/mirc.py

And class EditableTextWithSuggestions at

https://github.com/nvaccess/nvda/blob/master/source/NVDAObjects/behaviors.py

I've read your message and Reply from James Scholes. Hope this helps

2021-05-01 22:33 GMT+02:00, Florian Beijers <florianbeijers@gmail.com>:

It is hard to really specify the exact level of abstraction because of my
almost complete unfamiliarity with the way NVDA currently handles cases
like this, as well as my unfamiliarity with the way UIA and friends handle
cases like this. I'd say that your third case comes closest to what I am
trying to do. Scenarios like:

- Given object X in the object navigation hierarchy, report any new text
that is appended to the inner text of the object proactively.
- Given collection object Y in the object navigation hierarchy, look at any
new incoming children and report their inner text, if any.
- Given non-focused object Z, monitor for changes in it's content or state
and report based on a condition when either of these change.

A lot of apps do things you need to know about outside of the object you're
currently focused on, but the way this is done is always different, which
makes it hard to specifically ask a "how to do XYZ" question, as it were.
Your example looks promising for some of these scenarios though, I'll have
a look at it, thanks.
Florian


Op za 1 mei 2021 om 21:57 schreef James Scholes <james@jls-radio.com>:

As I often find myself saying on this list, it will help greatly if you
described what you're trying to do. The context really matters here.
For
example:

1. If you're trying to develop or modify a Windows app to fire screen
reader announcements, UIA does support a very similar concept to an ARIA
live region. The technologies used to implement that app will determine
how easily you can gain access to the functionality, e.g. in a .NET
WinForms app it's as easy as adding a control to a form and setting its
text. In a wxPython app, not so much.
2. If you just want your add-on to say something, import ui and use
ui.message.
3. If you're developing an add-on for an application with an updating
stream of text, like a console-style interaction, and you want NVDA to
automatically speak text as it comes in, there are ways to do that which
I've never quite managed to get my head around. Try
NVDAObjects.window.DisplayModelLiveText as a starting point.

Regards,

James Scholes

On 01/05/2021 at 2:20 pm, Florian Beijers wrote:
Hi,

I am a web developer first and foremost, and don't have a huge amount
of experience interacting with UIA and friends directly, so this is
really me looking for an analog to the concept I know.
Is there a pattern for the web concept of aria-live, where a
particular element on screen immediately echoes new text, but only the
new text, to NVDA as it comes in?
Think new messages in a chat window, new output for a terminal
program, that kind of thing.
If so, is there an example in some NVDA addon, guide, post or email
thread where I can see how this is done?

Thanks,
Florian













Florian Beijers
 

I will give those a look as well, thanks much :)


Op za 1 mei 2021 om 23:11 schreef Noelia Ruiz <nrm1977@...>:

Hello, following this thread, I think you may find useful to look at
these examples:

https://github.com/nvaccess/nvda/blob/master/source/appModules/mirc.py

And class EditableTextWithSuggestions at

https://github.com/nvaccess/nvda/blob/master/source/NVDAObjects/behaviors.py

I've read your message and Reply from James Scholes. Hope this helps

2021-05-01 22:33 GMT+02:00, Florian Beijers <florianbeijers@...>:
> It is hard to really specify the exact level of abstraction because of my
> almost complete unfamiliarity with the way NVDA currently handles cases
> like this, as well as my unfamiliarity with the way UIA and friends handle
> cases like this. I'd say that your third case comes closest to what I am
> trying to do. Scenarios like:
>
> - Given object X in the object navigation hierarchy, report any new text
> that is appended to the inner text of the object proactively.
> - Given collection object Y in the object navigation hierarchy, look at any
> new incoming children and report their inner text, if any.
> - Given non-focused object Z, monitor for changes in it's content or state
> and report based on a condition when either of these change.
>
> A lot of apps do things you need to know about outside of the object you're
> currently focused on, but the way this is done is always different, which
> makes it hard to specifically ask a "how to do XYZ" question, as it were.
> Your example looks promising for some of these scenarios though, I'll have
> a look at it, thanks.
> Florian
>
>
> Op za 1 mei 2021 om 21:57 schreef James Scholes <james@...>:
>
>> As I often find myself saying on this list, it will help greatly if you
>> described what you're trying to do.  The context really matters here.
>> For
>> example:
>>
>> 1. If you're trying to develop or modify a Windows app to fire screen
>> reader announcements, UIA does support a very similar concept to an ARIA
>> live region.  The technologies used to implement that app will determine
>> how easily you can gain access to the functionality, e.g. in a .NET
>> WinForms app it's as easy as adding a control to a form and setting its
>> text.  In a wxPython app, not so much.
>> 2. If you just want your add-on to say something, import ui and use
>> ui.message.
>> 3. If you're developing an add-on for an application with an updating
>> stream of text, like a console-style interaction, and you want NVDA to
>> automatically speak text as it comes in, there are ways to do that which
>> I've never quite managed to get my head around.  Try
>> NVDAObjects.window.DisplayModelLiveText as a starting point.
>>
>> Regards,
>>
>> James Scholes
>>
>> On 01/05/2021 at 2:20 pm, Florian Beijers wrote:
>> > Hi,
>> >
>> > I am a web developer first and foremost, and don't have a huge amount
>> > of experience interacting with UIA and friends directly, so this is
>> > really me looking for an analog to the concept I know.
>> > Is there a pattern for the web concept of aria-live, where a
>> > particular element on screen immediately echoes new text, but only the
>> > new text, to NVDA as it comes in?
>> > Think new messages in a chat window, new output for a terminal
>> > program, that kind of thing.
>> > If so, is there an example in some NVDA addon, guide, post or email
>> > thread  where I can see how this is done?
>> >
>> > Thanks,
>> > Florian
>> >
>> >
>> >
>> >
>> >
>>
>>
>>
>>
>>
>>
>
>
>
>
>
>