Skip to content

Refactor NVDAHelper32remote Live region handler#9079

Merged
feerrenrut merged 27 commits intonvaccess:masterfrom
derekriemer:live-region
Nov 16, 2020
Merged

Refactor NVDAHelper32remote Live region handler#9079
feerrenrut merged 27 commits intonvaccess:masterfrom
derekriemer:live-region

Conversation

@derekriemer
Copy link
Copy Markdown
Collaborator

@derekriemer derekriemer commented Dec 16, 2018

Link to issue number:

fixes #9077,
Unblocks #7756,
closes #7743

Summary of the issue:

This change separates the logic used for sending speech messages to core from the logic needed to send live region messages to core.

Description of how this pull request fixes the issue:

NVDAControllerInternal_speakMessage used to be used to send live regions at NVDA, which made it impossible to differentiate them from messages sent from external applications through the controller client. This change separates the passage of live regions into another function, nvdaControllerInternal_reportLiveRegion(wchar_t* text, wchar_t* level); which is part of the NVDAControllerInternal interface instead of the NVDAController interface. This is because I don't see a reason for non NVDA specific DLL's to call into this. This function is then used in place of speakTextt in ia2LiveRegions.cpp.

Testing performed:

Honestly, I have no idea how NVDA gets the message from the remote DLL to the local DLL. I performed manual testing to make sure this works, but there's magic going on I don't understand, so review with caution.

Known issues with pull request:

None

Change log entry:

@derekriemer derekriemer requested review from LeonarddeR, dkager, jcsteh, josephsl and michaelDCurran and removed request for dkager and josephsl December 16, 2018 07:25
@josephsl
Copy link
Copy Markdown
Contributor

josephsl commented Dec 16, 2018 via email

@derekriemer
Copy link
Copy Markdown
Collaborator Author

done.

Copy link
Copy Markdown
Contributor

@jcsteh jcsteh left a comment

Choose a reason for hiding this comment

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

In terms of code, this looks fine to me. However, Joseph is correct: @michaelDCurran is the best person to review this.

While I understand the desire to have this as a groundwork PR, I'm cautious of changes which introduce no user visible benefit while still introducing regression risk. I guess this is less important now that we no longer have the incubating stage, since we don't have to wait weeks before we can land dependent changes. If this were a concern, a tiny feature you could introduce here would be disabling of live region reporting if report dynamic content changes (NVDA+5) is disabled. However, I'll let @michaelDCurran decide whether he wants that done here or not.

Copy link
Copy Markdown
Collaborator

@LeonarddeR LeonarddeR left a comment

Choose a reason for hiding this comment

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

I agree with @jcsteh, it might help to have live regions reporting disabled with dynamic content changes.

@jcsteh
Copy link
Copy Markdown
Contributor

jcsteh commented Dec 17, 2018 via email

Copy link
Copy Markdown
Member

@michaelDCurran michaelDCurran left a comment

Choose a reason for hiding this comment

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

So far looks good. But:

  • nvdaHelper/vbufBackends/mshtml/node.cpp, line 393 still calls nvdaController_speakText.

@derekriemer
Copy link
Copy Markdown
Collaborator Author

  • nvdaHelper/vbufBackends/mshtml/node.cpp, line 393 still calls nvdaController_speakText.

Ooh, didn't know about this! I'll handle that one. I didn't even check this in IE :-)

@JulienCochuyt
Copy link
Copy Markdown
Contributor

This change would be very beneficial. Thank you @LeonarddeR for pointing this out.
We often encounter poorly designed web portals on which aria-live is set on lengthy news feeds.
Before this change, our only counter measure was to disable NVDA Controler altogether with all ARIA Live regions.

Could you please consider a mean to identify the node triggering the speech so that we could programatically disable Live announces for a specific node?
I guess adding the IAccessibleChildID or better yet the node offset as a third parameter would fit this need.

@LeonarddeR
Copy link
Copy Markdown
Collaborator

@derekriemer Are you intending to give this a follow up?

@derekriemer
Copy link
Copy Markdown
Collaborator Author

derekriemer commented Oct 3, 2019 via email

@JulienCochuyt
Copy link
Copy Markdown
Contributor

I have no idea how to fix the crash in my IE code. I do intend to, but it
may be years at this rate.

@derekriemer, maybe could I try to be of some help if you like.
This PR might bring a long awaited feature for us.
Could you please state how to reproduce the incident you're facing?

@derekriemer
Copy link
Copy Markdown
Collaborator Author

derekriemer commented Oct 6, 2019 via email

@AppVeyorBot

This comment has been minimized.

@feerrenrut
Copy link
Copy Markdown
Contributor

It seems the new aria grid system test is failing regularly. We'll take a look at it soon. For now I'll just kick off another PR build.

@AppVeyorBot

This comment has been minimized.

@feerrenrut
Copy link
Copy Markdown
Contributor

Actually it looks like all builds are failing because of this test. We'll get to it.

@AppVeyorBot

This comment has been minimized.

@AppVeyorBot
Copy link
Copy Markdown

See test results for failed build of commit cb7b9b21b7

@michaelDCurran
Copy link
Copy Markdown
Member

@feerrenrut were there any further things that needed to be addressed here? I merged master and fixed the remaining linting error. So with the system tests fixed, this now builds fine.

@dpy013
Copy link
Copy Markdown
Contributor

dpy013 commented Oct 27, 2020

Will this PR merge to NVDA 2020.4?

@feerrenrut
Copy link
Copy Markdown
Contributor

Given the change in 50de939 I want to be sure that this was tested again after fixing that assert. In the context of the discussion in #9079 (comment), essentially to be sure that we aren't inadvertently saving off an object referring to a temporary (C++) variable. I think this is unlikely, but I'd like to be sure.

@feerrenrut
Copy link
Copy Markdown
Contributor

If that is fine, I'm happy for this to be merged.

@LeonarddeR
Copy link
Copy Markdown
Collaborator

LeonarddeR commented Oct 28, 2020 via email

feerrenrut
feerrenrut previously approved these changes Nov 16, 2020
Copy link
Copy Markdown
Contributor

@feerrenrut feerrenrut left a comment

Choose a reason for hiding this comment

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

Thanks @LeonarddeR I'd forgotten this was ready to go.

@AppVeyorBot

This comment has been minimized.

@JulienCochuyt
Copy link
Copy Markdown
Contributor

It seems disabling reporting of dynamic content change might miss some cases: #12193 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow live regions to be disabled. Add option to disable automatic dynamic web content for a specific region of a webpage