Date   
Re: New contributor

Reef Turner
 

Welcome Arnold!

Thank you for your contributions, looking forward to working with you.

On Wed, 10 Apr 2019 at 03:55, Arnold Loubriat <datatriny@...> wrote:
Dear NVDA developers and contributors,
Some of you may already have encountered me on GitHub, I'm Arnold (also known as DataTriny). I'm a 21 years old software developer from France. Since I am currently unemployed, I decided to spare some time on this project (which greatly helps me daily as I am visually impaired).
I started submitting bug reports a long time ago, but I'm now trying to send pull requests. One or two already got merged, others are being reviewed, thanks for all the work!
I know several programming languages, (Python being one of them of course), and web technologies. I am fluent in English so I can pretty much understand all the discussions on GitHub (even with people using translators).
So, if you need someone to try replicating a bug, to do a particular task or whatever regarding this project, feel free to ping me @DataTriny.
Have a nice day, or night!

Arnold



--
Reef Turner
Software Developer 
 


Re: Problem with fast browse mode - multiple NVDAObjects are created

Reef Turner
 

Hi Tony,

I can't speak for Michael, or the previous conversations that you have had. However, I can point out that this has been a very busy month for us at NV Access. We have had a week at CSUN AT conference (and got over the resulting jetlag), worked hard to get 2019.1 out the door and are pursuing a 2019.1.1 release. Michael and the rest of the team are taking some leave before we get into the work for the next quarter. I'm telling you this just to give some context.

Internal to NV Access, I'm sure you can appreciate that we have our own priorities and quite a busy schedule. The best advice I can give you for getting help on your project, is to try to distil the problem down to it's core, explain it is simply and succinctly as you can. You may find that there are other people on this list who can help.

On Tue, 2 Apr 2019 at 18:15, Tony Malykh <anton.malykh@...> wrote:
Hello Michael,

Did you see my previous emails?

--Tony



On 3/25/2019 3:12 PM, Tony Malykh via Groups.Io wrote:
> Hello Michael,
>
> I was wondering if I could have any assistance with this issue? I was
> under impression that you offered to help me with debugging fast
> browse mode PR... I haven't heard from you for more than two weeks, so
> should I keep waiting? Or did I misunderstand you and I'm own my own
> with this PR?
>
> Thanks
>
> --Tony
>
> On 3/20/2019 9:20 AM, Tony Malykh via Groups.Io wrote:
>> Moving this thread to new mailing list.
>>
>> [BCC old mailing list]
>>
>>
>> --Tony
>>
>> On 3/9/2019 2:49 PM, Tony Malykh wrote:
>>> Hello NVDA devs and especially Michael,
>>>
>>> I am trying to work on fast browse mode PR (a.k.a. focus follows
>>> browse mode off).
>>> Just a quick recap: In v1 of this PR there were some  bugs related
>>> to the fact that some logic was asynchronous and it relied on
>>> gainFocus event being received from the operating system. However in
>>> some cases for unknown reason operating system wouldn't send this
>>> event, causing bugs that are hard to deal with, such as inability to
>>> activate form elements on web pages.
>>> I am now working on v2:
>>> https://github.com/nvaccess/nvda/pull/9360
>>> The code is by no means ready to be reviewed, but it's just for the
>>> reference.
>>> The main change in v2 is replacing asynchronous logic with
>>> synchronous logic there, and in general it works, but there is one
>>> new bugI'm facing that I would like to discuss and maybe ask for
>>> some help.
>>>
>>> Basic description of the bug:
>>> When unchecking a checkbox on a web page, its new state is not being
>>> announced. The bug only reproduces for unchecking - that is checking
>>> previously blank checkbox works as expected.
>>> Here are the concrete steps to reproduce the bug.
>>> 1. Enter Fast browse mode by pressing NVDA+num row 8.
>>> 2. In Chrome or Firefox navigate to
>>> https://www.ironspider.ca/forms/checkradio.htm
>>> 3. Check the first 3 checkboxes on the page
>>> 4. Go back to the first check box
>>> 5. Press space to uncheck it. The check box will be successfully
>>> unchecked, but the new state will not be announced immediately.
>>>
>>> I spent some time debugging this , and here are my findings so far.
>>> Announcing state change works like this. First
>>> speech.speakObject(obj,controlTypes.REASON_ONLYCACHE) is called to
>>> cache the previous state. In traditional browse mode this function
>>> is called when user navigates to that checkbox, and therefore system
>>> focus is switched to that checkbox as well. This happens in
>>> BrowseModeDocumentTreeInterceptor.event_gainFocus.
>>> Then, assuming that user presses space bar on a checkbox,
>>> BrowseModeTreeInterceptor._activatePosition is triggered, which
>>> activates this checkbox. Shortly, in response to that we receive a
>>> state changed event, that is processed in
>>> NVDAObject.event_stateChange(), which in turn calls
>>> speech.speakObjectProperties(self,states=True,
>>> reason=controlTypes.REASON_CHANGE).
>>> So we make two calls to speech module: the first one to cache object
>>> properties, the second one to speak whatever properties have
>>> changed. Cached properties are stored inside NVDAObject, so it is
>>> very important that the same object is passed to both these calls.
>>>
>>> Now back to fast browse mode v2. Since we don't update system focus
>>> on every browse mode focus change, we need to update system focus
>>> right before activating the checkbox. This is accomplished in
>>> BrowseModeTreeInterceptor.maybeSyncFocus(). And in the same
>>> function, right after I call obj.setFocus(), I also call
>>> speech.speakObject(obj,controlTypes.REASON_ONLYCACHE).
>>> However, here is the problem. When we receive state changed event,
>>> the function NVDAObject.event_stateChange is called on a different
>>> NVDA object instance. So we completely miss the cached state.
>>> When I say a different NVDAObject instance, I only mean a different
>>> python object. So there are apparently (at least) two NVDAObjects,
>>> I'll call them NVDAObject1 and NVDAObject2. Both represent the same
>>> checkbox in the browser, both have the same IA2UniqueID and
>>> windowHandle. Yet in the first call (cacheonly) I see NVDAObject1,
>>> and the state changed event comes in with NVDAObject2.
>>> To illustrate this, here is the example from my logs (slightly
>>> formatted):
>>> cacheonly from maybeSyncFocus():
>>>     <NVDAObjects.IAccessible.mozilla.Mozilla object at 0x07A6A370>
>>>     uniqueID = (67548, -33555216)
>>> speakObject on stateChanged
>>>     <NVDAObjects.IAccessible.mozilla.Mozilla object at 0x07A6A1F0>
>>>     uniqueID = (67548L, -33555216)
>>>
>>> So the big question I have is why there are two separate NVDAObjects
>>> created for the same checkbox in my scenario? And why they are not
>>> created Without my PR? What is logic behind creating new NVDA
>>> Objects? I did some cursory debugging of that and I saw that most of
>>> NVDAObjects are created using function getNVDAObjectFromEvent()
>>> defined in IAccessible2\__init__.py, and there doesn't seem to be
>>> any caching logic there.
>>> It seems there are two potential approaches of tackling this issue.
>>> 1. We need to figure out why two separate NVDA objects are created.
>>> 2. Potentially another approach is to allow creating multiple python
>>> NVDAObjects for the same Checkbox (or any other real IAccessible2
>>> object), and have a properties cache that would take this into
>>> account. Some kind of weakKeyDictionary might work. Property caching
>>> logic in speech.py might have to be redesigned though.
>>>
>>> And also another thing worth noticing in the logs that I pasted
>>> above. UniqueID is a tuple of WindowHandle and IA2UniqueID . If you
>>> looked at both entries carefully, you would notice that WindowHandle
>>> is slightly different: even though the value is the same, in the
>>> first entry it is int, and in the second entry it is long. This
>>> looks very suspicious to me. Do you think this might be the reason
>>> why two copies of NVDAObjects are created? On the other hand it
>>> doesn't explain why two objects are not created in stock NVDA.
>>>
>>> Anyway, this is current state of my second attempt to implement fast
>>> browse mode. Any suggestions will be appreciated!
>>> Best
>>> --Tony
>>>
>>
>>
>>
>
>
>





--
Reef Turner
Software Developer 
 


When is 2019.1.1 full release appearing?

Brian's Mail list account
 

I only ask as I thought I saw a forced build of it the other day, but its not actually up yet.
Brian

bglists@...
Sent via blueyonder.
Please address personal E-mail to:-
briang1@..., putting 'Brian Gaff'
in the display name field.

Re: When is 2019.1.1 full release appearing?

Brian's Mail list account
 

tag nvda/release-2019.1.1 (forced) c6116529: Correct build version to 2019.1.1





Just wondered where it was.

Brian


bglists@...
Sent via blueyonder.
Please address personal E-mail to:-
briang1@..., putting 'Brian Gaff'
in the display name field.

----- Original Message -----
From: "Brian's Mail list account via Groups.Io" <bglists=blueyonder.co.uk@groups.io>
To: "NVDA Dev list on groups.io" <nvda-devel@groups.io>
Sent: Thursday, April 11, 2019 8:31 PM
Subject: [nvda-devel] When is 2019.1.1 full release appearing?


I only ask as I thought I saw a forced build of it the other day, but its not actually up yet.
Brian

bglists@...
Sent via blueyonder.
Please address personal E-mail to:-
briang1@..., putting 'Brian Gaff'
in the display name field.

NVDA code contribution: what exactly is it

 

Hi everyone,

 

For folks on NVDA devlearning subgroup: consider this the “real” start of unit 5. For members of nvda-devel group, I’m skipping a fast intro to NVDA post for now.

 

Before getting into learning how to actually contribute code back to NVDA community, it is important for us to go over what exactly code contribution is (and is not).

 

Code contribution, in terms of NVDA, is more than just compliance with open-source philosophy of sharing code – it is one method for giving back to the NVDA community, and in extension, to the wider blindness and disability community. In short, you are effectively saying, “as a way of saying thank you, I’m donating my programming talent to a project that changes lives of thousands”.

 

First, code contribution is a way of saying thank you (for cultures that are sensitive to that). If you just use NVDA as a user with talent for programming, you’re just going to enjoy what NVDA has to offer on the surface. One way to go beyond a simple appreciation for what NVDA can do is thinking about giving back to your community, using the skills of a programmer or a code contributor.

 

Second, code contribution is a practical way to understand blindness and the associated reality indirectly through technology. For a blind computer user who uses NVDA, their reality is shaped by what the screen reader presents to them. If you want to understand how that “reality” is created, you must look at how the screen reader is coded (for those talented with it) and presents information. That way you can indirectly understand limitations of what blind people must face and possibilities out there.

 

Third, code contribution is a practical way of exercising your computer science education, at least with software that can give you immediate (or not so immediate) feedback. As some of you are kinetic learners (love the action), having a screen reader respond to you, especially respond to your code edits is a practical way of enriching your education.

 

Lastly, code contribution requires professional conduct and attitudes. NVDA is not just a volunteer project – we have professional programmers behind it alongside volunteer contributors (I myself fall into the latter category). In other words, the act of showing willingness to contribute code to NVDA project means you are ready to learn (and sometimes refresh yourself) about professional-level (or sort of equivalent) responsibilities in software engineering field.

 

Based on the above, you might think NVDA code contribution is easy, fun, and helpful, and in most cases, it is. But here are some things to think about, or rather, what code contribution is not:

 

First, the ability to contribute code is not an invitation to think you are very privileged i.e. above everyone else; rather, it is an invitation to think about understanding the humanity of NVDA community. Computer programs are human artifacts (or, in some cases, indirect human artifacts when AI was used to write code). As such, different people have different interpretations about how to use (and even write) the code you donate to NVDA community. As you begin (or continue) your journey as a code contributor for NVDA project, keep the humanity who will use your code in mind.

 

Second, do not think of NVDA code contribution as a one-time lab assignment; it is a lifelong process. If you think that fixing bugs is like a typical lab assignment, you are effectively saying, “NVDA GitHub issues and bug reports are yet another commodity”. Now I know for the fact that some of you are offended by it, and I apologize for coming across that way; but what I’m trying to say is that the experience of contributing back to NVDA community via code is a precious one that should be cherished.

 

Third, do not think you can show off your skills with massive (and sometimes, complicated) code changes. Often, changing one line resolves a host of bugs (the latest one being NVDA issue 9373 and associated pull request; the add-ons dialog inconsistency). My personal philosophy is to go with smallest changes that will have massive impact; in other words, the process of contributing code requires a lot of time spent thinking, not writing.

 

Fourth, speaking of writing, do not think you can get away with writing Python and C++ alone. As you learn more about code contribution (in subsequent posts), you will find that you’ll write more English and your native language (and others) than Python. This is because your source code change is just one aspect of being a competent code contributor – your other job is to being a competent and mindful communicator.

 

Take some time to think about what I outlined above, because the first (real) lesson in code contribution is examining one’s attitudes, not how to let NVDA say whatever you want. Only after thinking carefully about your attitudes will we get into our first lesson in code contribution: listening to users.

 

Cheers,

Joseph

Speak the Contents of a wx.StaticText Control When It Changes

Thomas Stivers
 

All,

I am working on an application using wxpython. I would like to have NVDA speak the contents of either a wx.StaticText or wx.TextCtrl when the text changes. Is there a way to do this wouthout the application actively calling a function from NVDA or the controller dll? I've tried using Refresh() and Update() on the controls, but I still have to take action for NVDA to tell me about the change.

Any thoughts would be appreciated.

Thomas

Re: Speak the Contents of a wx.StaticText Control When It Changes

Abdel
 

Hi Thomas,

Try winUser.NotifyWinEvent, it's used in the source/gui/nvdaControls.py module to give the states of the checkboxes.

Every time you update your wx.StaticText or wx.TextCtrl, you can use for example:

import winUser
winUser.NotifyWinEvent(winUser.EVENT_OBJECT_VALUECHANGE, self.Handle, winUser.OBJID_CLIENT, indexOfYourTextCtrl)


Hope this helps.

Kind regards,
Abdel.


Le 13/04/2019 à 03:34, Thomas Stivers a écrit :
All,

I am working on an application using wxpython. I would like to have NVDA speak the contents of either a wx.StaticText or wx.TextCtrl when the text changes. Is there a way to do this wouthout the application actively calling a function from NVDA or the controller dll? I've tried using Refresh() and Update() on the controls, but I still have to take action for NVDA to tell me about the change.

Any thoughts would be appreciated.

Thomas

Re: Problem with fast browse mode - multiple NVDAObjects are created

Tony Malykh
 

Hi Reef,
I appreciate your explanation.
1. I haven't heard from Michael for over a month. At this point I believe he saw my email and decided not to reply. I understand he was busy, but I can't believe he didn't have time to reply a few lines to me for over a month.
2. I believe I explained my problem clearly enough - duplicate  NVDA objects are created. The rest are details, test case, etc - you can find that in my previous emails in this thread.
3. I understand that you guys have your own set of priorities. However when you're saying that (and correct me if I'm wrong), it creates an impression that fast browse mode is not important or not worthy of Michael's reply. Here I pulled the list of 22 NVDA issues that I was trying to fix by fast browse mode (some of them are closed as duplicates):
    * nvda jumping the text box to enter the text to translate in google translator #8992
    * nvda 2018.4 beta 2 stuck in sum elements in web page #8999
    * Navigating quickly in edit fields on GMail causes NVDA to change from focus to browse mode unexpectedly #8211
    * When navigating the gmail page gsuite corporate inbox using the default view, nvda gets stuck in the navigation of the chat tabs #8111
    * NVDA cuts words and reports parts of different elements together on one key press; first occurance since nvda 2018.4 #9129
    * Internal focus handling seems quirky #5831
    * Browse mode problems with slow/inappropriate focus changes in browsers #2039
    * Losing Focus When Using Browse Mode #1544
    * Long pressing arror key will force to enter edit mode in firefox. #4719
    * In Firefox 37,when I move focus to a new line or control NVDA sometimes sets focus back to the previous line or control which had focus #5032
    * focus mode is activated due to caret movement sometimes randomly even when configured not to do so #5359
    * Firefox: Performance Degradation since merging #2039 Fix #5411
    * NVDA jumps when navigating on the web #2211
    * NVDA jumps to the bottom of the page when reaching the main landmark or heading level 1 on certain pages #4797
    * cursor moving backwards in navigation with the keyboard #2312
    * firefox edit fields: duplicate llines and words #3156
    * Sometimes focus jumps back to a previous web element in Firefox when arrowing down a webpage #4522
    * Internet Explorer 11 64 bit on windows 7 #6450
    * Timing issues in virtual buffers #6586
    * The user is unexpectedly dropped into focus mode on Twit.tv #6625
    * the cursor jumps backwards when browsing certain websites in Firefox, Chrome and Edge #7956
    * in chrome, sometimes focus is jumping #8013
So apparently NVDA users are bothered by bugs in NVDA browse mode as they keep creating new issues for years.
4. My attempts to fix all the bugs of fast browse mode take me deeper and deeper into NVDA internals. This particular problem with duplicate NVDA objects is very hard to fix. I could fix it for Chrome and Firefox by rewriting speech cache,but then in Internet explorer duplicate NVDA objects even have different IA2UniqueIDs, which makes it impossible for me to relate them. In edge there is another problem with focus event not being received, which I havn't started to look at. I was hoping to at least ask someone to explain to me what was the logic of creating NVDAObjects, when a new one is created as at a glance there doesn't seem to be any cache in NVDA code. But again, I received no reply. I was just trying to help NVDA, but it looks like my help is not very welcome here, Michael is only willing to be a passive code reviewer. Well, he's the boss here, but this attitude will make much harder for contributors to submit any pull requests longer than a few lines of code. Given all of that and given lack of my own free time, I'll not be working on fast browse mode anymore. I wish someone else could one day fix NVDA browse mode.
--Tony


On 4/10/2019 2:37 AM, Reef Turner wrote:
Hi Tony,

I can't speak for Michael, or the previous conversations that you have had. However, I can point out that this has been a very busy month for us at NV Access. We have had a week at CSUN AT conference (and got over the resulting jetlag), worked hard to get 2019.1 out the door and are pursuing a 2019.1.1 release. Michael and the rest of the team are taking some leave before we get into the work for the next quarter. I'm telling you this just to give some context.

Internal to NV Access, I'm sure you can appreciate that we have our own priorities and quite a busy schedule. The best advice I can give you for getting help on your project, is to try to distil the problem down to it's core, explain it is simply and succinctly as you can. You may find that there are other people on this list who can help.

On Tue, 2 Apr 2019 at 18:15, Tony Malykh <anton.malykh@...> wrote:
Hello Michael,

Did you see my previous emails?

--Tony



On 3/25/2019 3:12 PM, Tony Malykh via Groups.Io wrote:
> Hello Michael,
>
> I was wondering if I could have any assistance with this issue? I was
> under impression that you offered to help me with debugging fast
> browse mode PR... I haven't heard from you for more than two weeks, so
> should I keep waiting? Or did I misunderstand you and I'm own my own
> with this PR?
>
> Thanks
>
> --Tony
>
> On 3/20/2019 9:20 AM, Tony Malykh via Groups.Io wrote:
>> Moving this thread to new mailing list.
>>
>> [BCC old mailing list]
>>
>>
>> --Tony
>>
>> On 3/9/2019 2:49 PM, Tony Malykh wrote:
>>> Hello NVDA devs and especially Michael,
>>>
>>> I am trying to work on fast browse mode PR (a.k.a. focus follows
>>> browse mode off).
>>> Just a quick recap: In v1 of this PR there were some  bugs related
>>> to the fact that some logic was asynchronous and it relied on
>>> gainFocus event being received from the operating system. However in
>>> some cases for unknown reason operating system wouldn't send this
>>> event, causing bugs that are hard to deal with, such as inability to
>>> activate form elements on web pages.
>>> I am now working on v2:
>>> https://github.com/nvaccess/nvda/pull/9360
>>> The code is by no means ready to be reviewed, but it's just for the
>>> reference.
>>> The main change in v2 is replacing asynchronous logic with
>>> synchronous logic there, and in general it works, but there is one
>>> new bugI'm facing that I would like to discuss and maybe ask for
>>> some help.
>>>
>>> Basic description of the bug:
>>> When unchecking a checkbox on a web page, its new state is not being
>>> announced. The bug only reproduces for unchecking - that is checking
>>> previously blank checkbox works as expected.
>>> Here are the concrete steps to reproduce the bug.
>>> 1. Enter Fast browse mode by pressing NVDA+num row 8.
>>> 2. In Chrome or Firefox navigate to
>>> https://www.ironspider.ca/forms/checkradio.htm
>>> 3. Check the first 3 checkboxes on the page
>>> 4. Go back to the first check box
>>> 5. Press space to uncheck it. The check box will be successfully
>>> unchecked, but the new state will not be announced immediately.
>>>
>>> I spent some time debugging this , and here are my findings so far.
>>> Announcing state change works like this. First
>>> speech.speakObject(obj,controlTypes.REASON_ONLYCACHE) is called to
>>> cache the previous state. In traditional browse mode this function
>>> is called when user navigates to that checkbox, and therefore system
>>> focus is switched to that checkbox as well. This happens in
>>> BrowseModeDocumentTreeInterceptor.event_gainFocus.
>>> Then, assuming that user presses space bar on a checkbox,
>>> BrowseModeTreeInterceptor._activatePosition is triggered, which
>>> activates this checkbox. Shortly, in response to that we receive a
>>> state changed event, that is processed in
>>> NVDAObject.event_stateChange(), which in turn calls
>>> speech.speakObjectProperties(self,states=True,
>>> reason=controlTypes.REASON_CHANGE).
>>> So we make two calls to speech module: the first one to cache object
>>> properties, the second one to speak whatever properties have
>>> changed. Cached properties are stored inside NVDAObject, so it is
>>> very important that the same object is passed to both these calls.
>>>
>>> Now back to fast browse mode v2. Since we don't update system focus
>>> on every browse mode focus change, we need to update system focus
>>> right before activating the checkbox. This is accomplished in
>>> BrowseModeTreeInterceptor.maybeSyncFocus(). And in the same
>>> function, right after I call obj.setFocus(), I also call
>>> speech.speakObject(obj,controlTypes.REASON_ONLYCACHE).
>>> However, here is the problem. When we receive state changed event,
>>> the function NVDAObject.event_stateChange is called on a different
>>> NVDA object instance. So we completely miss the cached state.
>>> When I say a different NVDAObject instance, I only mean a different
>>> python object. So there are apparently (at least) two NVDAObjects,
>>> I'll call them NVDAObject1 and NVDAObject2. Both represent the same
>>> checkbox in the browser, both have the same IA2UniqueID and
>>> windowHandle. Yet in the first call (cacheonly) I see NVDAObject1,
>>> and the state changed event comes in with NVDAObject2.
>>> To illustrate this, here is the example from my logs (slightly
>>> formatted):
>>> cacheonly from maybeSyncFocus():
>>>     <NVDAObjects.IAccessible.mozilla.Mozilla object at 0x07A6A370>
>>>     uniqueID = (67548, -33555216)
>>> speakObject on stateChanged
>>>     <NVDAObjects.IAccessible.mozilla.Mozilla object at 0x07A6A1F0>
>>>     uniqueID = (67548L, -33555216)
>>>
>>> So the big question I have is why there are two separate NVDAObjects
>>> created for the same checkbox in my scenario? And why they are not
>>> created Without my PR? What is logic behind creating new NVDA
>>> Objects? I did some cursory debugging of that and I saw that most of
>>> NVDAObjects are created using function getNVDAObjectFromEvent()
>>> defined in IAccessible2\__init__.py, and there doesn't seem to be
>>> any caching logic there.
>>> It seems there are two potential approaches of tackling this issue.
>>> 1. We need to figure out why two separate NVDA objects are created.
>>> 2. Potentially another approach is to allow creating multiple python
>>> NVDAObjects for the same Checkbox (or any other real IAccessible2
>>> object), and have a properties cache that would take this into
>>> account. Some kind of weakKeyDictionary might work. Property caching
>>> logic in speech.py might have to be redesigned though.
>>>
>>> And also another thing worth noticing in the logs that I pasted
>>> above. UniqueID is a tuple of WindowHandle and IA2UniqueID . If you
>>> looked at both entries carefully, you would notice that WindowHandle
>>> is slightly different: even though the value is the same, in the
>>> first entry it is int, and in the second entry it is long. This
>>> looks very suspicious to me. Do you think this might be the reason
>>> why two copies of NVDAObjects are created? On the other hand it
>>> doesn't explain why two objects are not created in stock NVDA.
>>>
>>> Anyway, this is current state of my second attempt to implement fast
>>> browse mode. Any suggestions will be appreciated!
>>> Best
>>> --Tony
>>>
>>
>>
>>
>
>
>





--
Reef Turner
Software Developer 
 
Facebook: https://www.facebook.com/NVAccess 
Twitter: @NVAccess 


Unit 5: key terms, and a high-level overview of code contribution steps

 

Hi all,

 

For those on nvda-devel list, don’t worry about “?unit 5” bit in the subject line, as it is for devlearning people.

 

For those who’ve joined us lately: we’re in the middle of a course on how to contribute code to NVDA. We looked at what code contribution is (and is not), along with mindset associated with it. We’ll now get into the details of this process, starting with definitions of key terms and a high-level overview of code contribution steps.

 

A few definitions you’ll encounter in your journey through NVDA code contributions:

 

  • Branch: a separate tree of Git commits.
  • Pull request: contributing changes to source code of a project.
  • Code review: discussion surrounding a code change proposed through a pull request.
  • Reviewers: people reviewing a pull request.

 

Let’s take a look at how code contribution works from a high level:

 

One day, out of the blue (or perhaps while you were eating, walking, typing, sleeping, etc.), a sudden thought about NVDA source code comes to your mind. It could be triggered by a bug report, a lengthy (or not so lengthy) discussion about a feature, or perhaps you might be feeling adventurous. In case you get an email about a bug report, you’d read it, think about it, and do some readings (or research, if you will).

 

While thinking about whatever that triggered your mind, you feel that you can help make a difference in a person’s life by coding it. So you start going through NVDA source code, experimenting here and there, and write how you are going to solve a problem (or rather, how this unknown user will benefit from the code changes you’re making). You then plan, write, and test your edits.

 

Once you’re satisfied that the edits are working as intended, you would commit to a branch (a separate branch, in fact, not master; at least one NVDA pull request had to be rewritten simply because the pull request came from master branch from a forked copy). You then send in a pull request, detailing what your code will do and ask for a code review. Then people will comment on a pull request, suggesting changes, approving it, or rejecting it (rejection is rare). Then, once you and the reviewer agree that it is ready, it’ll be approved and merged (which can take hours to years).

 

And that’s just the beginning. The pull request will still need to be validated (tested) by more people, and only after going through several rounds of testing by people using alpha snapshots, it is declared ready. In the intervening time there will be zero or more bug reports on the feature you’ve provided, and you must be ready to respond if a bug report is traced to your pull request.

 

A follow-up comment stemming from what I just described goes something like this: a contributor posted a pull request, it was approved, then it was backed out (removed from master branch). The contributor wrote a follow-up pull request and wants it merged as soon as possible. To that, I have no definitive recommendation, but I think it’d be best for both sides to explain their reasoning in a civil manner (this is the reason why I stressed importance of one’s conduct as a code contributor).

 

Another follow-up comment, or more towards a question: how long does it for a pull request to be merged into NVDA? Depends on many things, including the scope of the pull request, time for code review, follow-ups, major changes that necessitate rewriting a pull request and such. Some of my own pull requests were reviewed and approved within hours, while the longest one lasted at least a year; the longest in my memory is wxPython 4 upgrade, which took more than three years, including conception, researching, planning, elaborating, writing, testing, reviewing, and looking for follow-up comments.

 

The rest of this series will focus on diving into individual parts of code contribution steps noted above.

Cheers,

Joseph

Re: Speak the Contents of a wx.StaticText Control When It Changes

James Scholes
 

There are a number of possible solutions here, but none of them do what you're directly asking for. NVDA doesn't speak changes to static text controls by default and there's no way for your application to force it to do so.

In terms of NVDA-specific solutions, you can use the NVDA Controller Client as you've mentioned or bundle an NVDA add-on with your program. There are other screen readers out there, so you risk excluding other users with these approaches.

Consider modifying the program itself to communicate the information in a different way. For example, if the static text changes are reporting that some sort of processing has begun, open a progress dialog. Alternatively, AFAIK NVDA will always report label changes for the focused control, so as a hacky solution you could just put the text on a button. Static texts don't appear in the tab order, so don't force the user's focus onto those.

Regards,

James Scholes

On 12/04/2019 at 8:34 pm, Thomas Stivers wrote:
All,
I am working on an application using wxpython. I would like to have NVDA speak the contents of either a wx.StaticText or wx.TextCtrl when the text changes. Is there a way to do this wouthout the application actively calling a function from NVDA or the controller dll? I've tried using Refresh() and Update() on the controls, but I still have to take action for NVDA to tell me about the change.
Any thoughts would be appreciated.
Thomas

Re: Help with sysListView selection

Alberto Buffolino
 

Abdel, il 07/04/2019 23.14, ha scritto:
However, I find that it does not always work, so it's not really reliable.
Alberto:
Hi Abdel, and Robert,
first, sorry for delay.
Then, thanks for your support, as usual.
Unfortunately, yes, use of LVITEM seems not very reliable, I encountered a list where it brings even to program crash... I must discover an alternative method.
Thanks again.
Alberto

Re: Problem with fast browse mode - multiple NVDAObjects are created

Michael Curran
 

Hi Tony,


I would like to publicly apologize for not replying to your email around a month ago. I should have at very least explained that I did not have time to look at this at that point in time.


I still stand by my statement that I do think this work is important, and that I would like to see this in 2019.2. I also want to get this work in before speech refactor / Python 3. Therefore, I will in deed prioritize this now.


I need to clear my head enough to give this full attention and try and reconcile the issues I previously had with the PR. I am currently on personal leave but will be back next week and will start looking into it again then.


Thanks again for your contributions.


Mick










On 4/14/2019 5:06 AM, Tony Malykh wrote:

Hi Reef,
I appreciate your explanation.
1. I haven't heard from Michael for over a month. At this point I believe he saw my email and decided not to reply. I understand he was busy, but I can't believe he didn't have time to reply a few lines to me for over a month.
2. I believe I explained my problem clearly enough - duplicate  NVDA objects are created. The rest are details, test case, etc - you can find that in my previous emails in this thread.
3. I understand that you guys have your own set of priorities. However when you're saying that (and correct me if I'm wrong), it creates an impression that fast browse mode is not important or not worthy of Michael's reply. Here I pulled the list of 22 NVDA issues that I was trying to fix by fast browse mode (some of them are closed as duplicates):
    * nvda jumping the text box to enter the text to translate in google translator #8992
    * nvda 2018.4 beta 2 stuck in sum elements in web page #8999
    * Navigating quickly in edit fields on GMail causes NVDA to change from focus to browse mode unexpectedly #8211
    * When navigating the gmail page gsuite corporate inbox using the default view, nvda gets stuck in the navigation of the chat tabs #8111
    * NVDA cuts words and reports parts of different elements together on one key press; first occurance since nvda 2018.4 #9129
    * Internal focus handling seems quirky #5831
    * Browse mode problems with slow/inappropriate focus changes in browsers #2039
    * Losing Focus When Using Browse Mode #1544
    * Long pressing arror key will force to enter edit mode in firefox. #4719
    * In Firefox 37,when I move focus to a new line or control NVDA sometimes sets focus back to the previous line or control which had focus #5032
    * focus mode is activated due to caret movement sometimes randomly even when configured not to do so #5359
    * Firefox: Performance Degradation since merging #2039 Fix #5411
    * NVDA jumps when navigating on the web #2211
    * NVDA jumps to the bottom of the page when reaching the main landmark or heading level 1 on certain pages #4797
    * cursor moving backwards in navigation with the keyboard #2312
    * firefox edit fields: duplicate llines and words #3156
    * Sometimes focus jumps back to a previous web element in Firefox when arrowing down a webpage #4522
    * Internet Explorer 11 64 bit on windows 7 #6450
    * Timing issues in virtual buffers #6586
    * The user is unexpectedly dropped into focus mode on Twit.tv #6625
    * the cursor jumps backwards when browsing certain websites in Firefox, Chrome and Edge #7956
    * in chrome, sometimes focus is jumping #8013
So apparently NVDA users are bothered by bugs in NVDA browse mode as they keep creating new issues for years.
4. My attempts to fix all the bugs of fast browse mode take me deeper and deeper into NVDA internals. This particular problem with duplicate NVDA objects is very hard to fix. I could fix it for Chrome and Firefox by rewriting speech cache,but then in Internet explorer duplicate NVDA objects even have different IA2UniqueIDs, which makes it impossible for me to relate them. In edge there is another problem with focus event not being received, which I havn't started to look at. I was hoping to at least ask someone to explain to me what was the logic of creating NVDAObjects, when a new one is created as at a glance there doesn't seem to be any cache in NVDA code. But again, I received no reply. I was just trying to help NVDA, but it looks like my help is not very welcome here, Michael is only willing to be a passive code reviewer. Well, he's the boss here, but this attitude will make much harder for contributors to submit any pull requests longer than a few lines of code. Given all of that and given lack of my own free time, I'll not be working on fast browse mode anymore. I wish someone else could one day fix NVDA browse mode.
--Tony


On 4/10/2019 2:37 AM, Reef Turner wrote:
Hi Tony,

I can't speak for Michael, or the previous conversations that you have had. However, I can point out that this has been a very busy month for us at NV Access. We have had a week at CSUN AT conference (and got over the resulting jetlag), worked hard to get 2019.1 out the door and are pursuing a 2019.1.1 release. Michael and the rest of the team are taking some leave before we get into the work for the next quarter. I'm telling you this just to give some context.

Internal to NV Access, I'm sure you can appreciate that we have our own priorities and quite a busy schedule. The best advice I can give you for getting help on your project, is to try to distil the problem down to it's core, explain it is simply and succinctly as you can. You may find that there are other people on this list who can help.

On Tue, 2 Apr 2019 at 18:15, Tony Malykh <anton.malykh@...> wrote:
Hello Michael,

Did you see my previous emails?

--Tony



On 3/25/2019 3:12 PM, Tony Malykh via Groups.Io wrote:
> Hello Michael,
>
> I was wondering if I could have any assistance with this issue? I was
> under impression that you offered to help me with debugging fast
> browse mode PR... I haven't heard from you for more than two weeks, so
> should I keep waiting? Or did I misunderstand you and I'm own my own
> with this PR?
>
> Thanks
>
> --Tony
>
> On 3/20/2019 9:20 AM, Tony Malykh via Groups.Io wrote:
>> Moving this thread to new mailing list.
>>
>> [BCC old mailing list]
>>
>>
>> --Tony
>>
>> On 3/9/2019 2:49 PM, Tony Malykh wrote:
>>> Hello NVDA devs and especially Michael,
>>>
>>> I am trying to work on fast browse mode PR (a.k.a. focus follows
>>> browse mode off).
>>> Just a quick recap: In v1 of this PR there were some  bugs related
>>> to the fact that some logic was asynchronous and it relied on
>>> gainFocus event being received from the operating system. However in
>>> some cases for unknown reason operating system wouldn't send this
>>> event, causing bugs that are hard to deal with, such as inability to
>>> activate form elements on web pages.
>>> I am now working on v2:
>>> https://github.com/nvaccess/nvda/pull/9360
>>> The code is by no means ready to be reviewed, but it's just for the
>>> reference.
>>> The main change in v2 is replacing asynchronous logic with
>>> synchronous logic there, and in general it works, but there is one
>>> new bugI'm facing that I would like to discuss and maybe ask for
>>> some help.
>>>
>>> Basic description of the bug:
>>> When unchecking a checkbox on a web page, its new state is not being
>>> announced. The bug only reproduces for unchecking - that is checking
>>> previously blank checkbox works as expected.
>>> Here are the concrete steps to reproduce the bug.
>>> 1. Enter Fast browse mode by pressing NVDA+num row 8.
>>> 2. In Chrome or Firefox navigate to
>>> https://www.ironspider.ca/forms/checkradio.htm
>>> 3. Check the first 3 checkboxes on the page
>>> 4. Go back to the first check box
>>> 5. Press space to uncheck it. The check box will be successfully
>>> unchecked, but the new state will not be announced immediately.
>>>
>>> I spent some time debugging this , and here are my findings so far.
>>> Announcing state change works like this. First
>>> speech.speakObject(obj,controlTypes.REASON_ONLYCACHE) is called to
>>> cache the previous state. In traditional browse mode this function
>>> is called when user navigates to that checkbox, and therefore system
>>> focus is switched to that checkbox as well. This happens in
>>> BrowseModeDocumentTreeInterceptor.event_gainFocus.
>>> Then, assuming that user presses space bar on a checkbox,
>>> BrowseModeTreeInterceptor._activatePosition is triggered, which
>>> activates this checkbox. Shortly, in response to that we receive a
>>> state changed event, that is processed in
>>> NVDAObject.event_stateChange(), which in turn calls
>>> speech.speakObjectProperties(self,states=True,
>>> reason=controlTypes.REASON_CHANGE).
>>> So we make two calls to speech module: the first one to cache object
>>> properties, the second one to speak whatever properties have
>>> changed. Cached properties are stored inside NVDAObject, so it is
>>> very important that the same object is passed to both these calls.
>>>
>>> Now back to fast browse mode v2. Since we don't update system focus
>>> on every browse mode focus change, we need to update system focus
>>> right before activating the checkbox. This is accomplished in
>>> BrowseModeTreeInterceptor.maybeSyncFocus(). And in the same
>>> function, right after I call obj.setFocus(), I also call
>>> speech.speakObject(obj,controlTypes.REASON_ONLYCACHE).
>>> However, here is the problem. When we receive state changed event,
>>> the function NVDAObject.event_stateChange is called on a different
>>> NVDA object instance. So we completely miss the cached state.
>>> When I say a different NVDAObject instance, I only mean a different
>>> python object. So there are apparently (at least) two NVDAObjects,
>>> I'll call them NVDAObject1 and NVDAObject2. Both represent the same
>>> checkbox in the browser, both have the same IA2UniqueID and
>>> windowHandle. Yet in the first call (cacheonly) I see NVDAObject1,
>>> and the state changed event comes in with NVDAObject2.
>>> To illustrate this, here is the example from my logs (slightly
>>> formatted):
>>> cacheonly from maybeSyncFocus():
>>>     <NVDAObjects.IAccessible.mozilla.Mozilla object at 0x07A6A370>
>>>     uniqueID = (67548, -33555216)
>>> speakObject on stateChanged
>>>     <NVDAObjects.IAccessible.mozilla.Mozilla object at 0x07A6A1F0>
>>>     uniqueID = (67548L, -33555216)
>>>
>>> So the big question I have is why there are two separate NVDAObjects
>>> created for the same checkbox in my scenario? And why they are not
>>> created Without my PR? What is logic behind creating new NVDA
>>> Objects? I did some cursory debugging of that and I saw that most of
>>> NVDAObjects are created using function getNVDAObjectFromEvent()
>>> defined in IAccessible2\__init__.py, and there doesn't seem to be
>>> any caching logic there.
>>> It seems there are two potential approaches of tackling this issue.
>>> 1. We need to figure out why two separate NVDA objects are created.
>>> 2. Potentially another approach is to allow creating multiple python
>>> NVDAObjects for the same Checkbox (or any other real IAccessible2
>>> object), and have a properties cache that would take this into
>>> account. Some kind of weakKeyDictionary might work. Property caching
>>> logic in speech.py might have to be redesigned though.
>>>
>>> And also another thing worth noticing in the logs that I pasted
>>> above. UniqueID is a tuple of WindowHandle and IA2UniqueID . If you
>>> looked at both entries carefully, you would notice that WindowHandle
>>> is slightly different: even though the value is the same, in the
>>> first entry it is int, and in the second entry it is long. This
>>> looks very suspicious to me. Do you think this might be the reason
>>> why two copies of NVDAObjects are created? On the other hand it
>>> doesn't explain why two objects are not created in stock NVDA.
>>>
>>> Anyway, this is current state of my second attempt to implement fast
>>> browse mode. Any suggestions will be appreciated!
>>> Best
>>> --Tony
>>>
>>
>>
>>
>
>
>





--
Reef Turner
Software Developer 
 
Facebook: https://www.facebook.com/NVAccess 
Twitter: @NVAccess 


Add Shift+Enter and Shift+numpadEnter for announcing previous cell in the same column in Excel

Abdel
 

Hi dear developers of NVDA,

I come back with a request I had already made in the past concerning the announcement of the current cell with Excel.

In principle, as the enter and numpadEnter keys announce the next cell in the same column, the shift+enter and shift+numpadEnter keys should announce the previous cell.

In fact, moving to previous or next cell is integrated by default in Excel, NVDA should just announce the current cell with each move.

I think it should be simple enough to implement, just add these 2 gestures in the 'NVDAObjects.window.excel.py' module, in the ExcelWorksheet class and more particularly, in the gestures parameter of the scriptHandler.script decorator.

I just created for that, it's available here :

https://github.com/nvaccess/nvda/pull/9492

Thank you for integrating this change into a future version of NVDA.

Best regards,
Abdel.

Re: Add Shift+Enter and Shift+numpadEnter for announcing previous cell in the same column in Excel

Abdel
 

Hi again,

I've just recreated my Pull Request, it's available here:

https://github.com/nvaccess/nvda/pull/9495

Thanks to whoever would like to review it.

Kind regards,
Abdel.


Le 15/04/2019 à 19:27, Abdel a écrit :
Hi dear developers of NVDA,

I come back with a request I had already made in the past concerning the announcement of the current cell with Excel.

In principle, as the enter and numpadEnter keys announce the next cell in the same column, the shift+enter and shift+numpadEnter keys should announce the previous cell.

In fact, moving to previous or next cell is integrated by default in Excel, NVDA should just announce the current cell with each move.

I think it should be simple enough to implement, just add these 2 gestures in the 'NVDAObjects.window.excel.py' module, in the ExcelWorksheet class and more particularly, in the gestures parameter of the scriptHandler.script decorator.

I just created for that, it's available here :

https://github.com/nvaccess/nvda/pull/9492

Thank you for integrating this change into a future version of NVDA.

Best regards,
Abdel.



Re: Add Shift+Enter and Shift+numpadEnter for announcing previous cell in the same column in Excel

Jim Homme
 

Hi,
Both keys are a key conflict with Excel. Also, the changes I am thinking about with Excel would have more things speaking with the key we already have, NVDA+TAB. Instead of the current cell only, I would have sheet name, column and row info, and current cell.

Jim



==========
Jim Homme
Digital Accessibility
Bender Consulting Services
412-787-8567
https://www.benderconsult.com/our%20services/hightest-accessible-technology-solutions

-----Original Message-----
From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Abdel via Groups.Io
Sent: Monday, April 15, 2019 1:28 PM
To: nvda-devel@groups.io
Subject: [nvda-devel] Add Shift+Enter and Shift+numpadEnter for announcing previous cell in the same column in Excel

Hi dear developers of NVDA,

I come back with a request I had already made in the past concerning the announcement of the current cell with Excel.

In principle, as the enter and numpadEnter keys announce the next cell in the same column, the shift+enter and shift+numpadEnter keys should announce the previous cell.

In fact, moving to previous or next cell is integrated by default in Excel, NVDA should just announce the current cell with each move.

I think it should be simple enough to implement, just add these 2 gestures in the 'NVDAObjects.window.excel.py' module, in the ExcelWorksheet class and more particularly, in the gestures parameter of the scriptHandler.script decorator.

I just created for that, it's available here :

https://github.com/nvaccess/nvda/pull/9492

Thank you for integrating this change into a future version of NVDA.

Best regards,
Abdel.

Re: Add Shift+Enter and Shift+numpadEnter for announcing previous cell in the same column in Excel

Rui Fontes
 

Excuse me, but what Abdel wants is NVDA announcing the new cell where the focus go when pressing Shift+Enter...
Excel moves to the previous cell, but NVDA do not move the focus neither announces the new cell...

Rui Fontes


Às 18:41 de 15/04/2019, Jim Homme escreveu:

Hi,
Both keys are a key conflict with Excel. Also, the changes I am thinking about with Excel would have more things speaking with the key we already have, NVDA+TAB. Instead of the current cell only, I would have sheet name, column and row info, and current cell.
Jim
==========
Jim Homme
Digital Accessibility
Bender Consulting Services
412-787-8567
https://www.benderconsult.com/our%20services/hightest-accessible-technology-solutions
-----Original Message-----
From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Abdel via Groups.Io
Sent: Monday, April 15, 2019 1:28 PM
To: nvda-devel@groups.io
Subject: [nvda-devel] Add Shift+Enter and Shift+numpadEnter for announcing previous cell in the same column in Excel
Hi dear developers of NVDA,
I come back with a request I had already made in the past concerning the announcement of the current cell with Excel.
In principle, as the enter and numpadEnter keys announce the next cell in the same column, the shift+enter and shift+numpadEnter keys should announce the previous cell.
In fact, moving to previous or next cell is integrated by default in Excel, NVDA should just announce the current cell with each move.
I think it should be simple enough to implement, just add these 2 gestures in the 'NVDAObjects.window.excel.py' module, in the ExcelWorksheet class and more particularly, in the gestures parameter of the scriptHandler.script decorator.
I just created for that, it's available here :

https://github.com/nvaccess/nvda/pull/9492
Thank you for integrating this change into a future version of NVDA.
Best regards,
Abdel.

Re: Add Shift+Enter and Shift+numpadEnter for announcing previous cell in the same column in Excel

Abdel
 

Hi Jim, Ruiz and all,

@Jim:

If you look at the module 'NVDAObjects.window.excel.py', in the ExcelWorksheet class and more particularly, in the gestures parameter of the scriptHandler.script decorator, you will see that almost all keyboard shortcuts to change the selection are present.

tab, shift+tab, enter, and so on...

NVDA then handle the arrival on the new cell reached by announcing it.

As shift + enter and shift + numpadEnter are missing in this list, the announcement is not made when using these 2 keys.

I just recreated the Pull Request, for the following reason:

With Pull Request 9492 and 9495, I had 22 changes on 22 lines because my old text editor was modifying line breaks in some lines, which is considered a change by git diff.

In principle, git diff had to give me 2 changes only, because I only added 2 lines.

So I decided to recreate the PR, this time using NotepadPlusPlus, and the problem does not arise anymore.

Here is the new and last Pull Request 9497 on this subject:

https://github.com/nvaccess/nvda/pull/9497

Thanks in advance to the developer who would like to review it.

Kind regards,
Abdel.


Le 16/04/2019 à 02:39, Rui Fontes a écrit :
Excuse me, but what Abdel wants is NVDA announcing the new cell where the focus go when pressing Shift+Enter...
Excel moves to the previous cell, but NVDA do not move the focus neither announces the new cell...

Rui Fontes


Às 18:41 de 15/04/2019, Jim Homme escreveu:
Hi,
Both keys are a key conflict with Excel. Also, the changes I am thinking about with Excel would have more things speaking with the key we already have, NVDA+TAB. Instead of the current cell only, I would have sheet name, column and row info, and current cell.

Jim



==========
Jim Homme
Digital Accessibility
Bender Consulting Services
412-787-8567
https://www.benderconsult.com/our%20services/hightest-accessible-technology-solutions

-----Original Message-----
From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Abdel via Groups.Io
Sent: Monday, April 15, 2019 1:28 PM
To: nvda-devel@groups.io
Subject: [nvda-devel] Add Shift+Enter and Shift+numpadEnter for announcing previous cell in the same column in Excel

Hi dear developers of NVDA,

I come back with a request I had already made in the past concerning the announcement of the current cell with Excel.

In principle, as the enter and numpadEnter keys announce the next cell in the same column, the shift+enter and shift+numpadEnter keys should announce the previous cell.

In fact, moving to previous or next cell is integrated by default in Excel, NVDA should just announce the current cell with each move.

I think it should be simple enough to implement, just add these 2 gestures in the 'NVDAObjects.window.excel.py' module, in the ExcelWorksheet class and more particularly, in the gestures parameter of the scriptHandler.script decorator.

I just created for that, it's available here :

https://github.com/nvaccess/nvda/pull/9492

Thank you for integrating this change into a future version of NVDA.

Best regards,
Abdel.







Re: Add Shift+Enter and Shift+numpadEnter for announcing previous cell in the same column in Excel

Jim Homme
 

Hi,
I'm sorry I was unclear with what I said. I was trying to say that Excel uses these keys for its purposes. Am I missing something?

Thanks.

Jim



==========
Jim Homme
Digital Accessibility
Bender Consulting Services
412-787-8567
https://www.benderconsult.com/our%20services/hightest-accessible-technology-solutions

-----Original Message-----
From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Abdel via Groups.Io
Sent: Tuesday, April 16, 2019 2:39 AM
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] Add Shift+Enter and Shift+numpadEnter for announcing previous cell in the same column in Excel

Hi Jim, Ruiz and all,

@Jim:

If you look at the module 'NVDAObjects.window.excel.py', in the ExcelWorksheet class and more particularly, in the gestures parameter of the scriptHandler.script decorator, you will see that almost all keyboard shortcuts to change the selection are present.

tab, shift+tab, enter, and so on...

NVDA then handle the arrival on the new cell reached by announcing it.

As shift + enter and shift + numpadEnter are missing in this list, the announcement is not made when using these 2 keys.

I just recreated the Pull Request, for the following reason:

With Pull Request 9492 and 9495, I had 22 changes on 22 lines because my old text editor was modifying line breaks in some lines, which is considered a change by git diff.

In principle, git diff had to give me 2 changes only, because I only added 2 lines.

So I decided to recreate the PR, this time using NotepadPlusPlus, and the problem does not arise anymore.

Here is the new and last Pull Request 9497 on this subject:

https://github.com/nvaccess/nvda/pull/9497

Thanks in advance to the developer who would like to review it.

Kind regards,
Abdel.


Le 16/04/2019 à 02:39, Rui Fontes a écrit :
Excuse me, but what Abdel wants is NVDA announcing the new cell where
the focus go when pressing Shift+Enter...
Excel moves to the previous cell, but NVDA do not move the focus
neither announces the new cell...

Rui Fontes


Às 18:41 de 15/04/2019, Jim Homme escreveu:
Hi,
Both keys are a key conflict with Excel. Also, the changes I am
thinking about with Excel would have more things speaking with the
key we already have, NVDA+TAB. Instead of the current cell only, I
would have sheet name, column and row info, and current cell.

Jim



==========
Jim Homme
Digital Accessibility
Bender Consulting Services
412-787-8567
https://www.benderconsult.com/our%20services/hightest-accessible-tech
nology-solutions


-----Original Message-----
From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Abdel
via Groups.Io
Sent: Monday, April 15, 2019 1:28 PM
To: nvda-devel@groups.io
Subject: [nvda-devel] Add Shift+Enter and Shift+numpadEnter for
announcing previous cell in the same column in Excel

Hi dear developers of NVDA,

I come back with a request I had already made in the past concerning
the announcement of the current cell with Excel.

In principle, as the enter and numpadEnter keys announce the next
cell in the same column, the shift+enter and shift+numpadEnter keys
should announce the previous cell.

In fact, moving to previous or next cell is integrated by default in
Excel, NVDA should just announce the current cell with each move.

I think it should be simple enough to implement, just add these 2
gestures in the 'NVDAObjects.window.excel.py' module, in the
ExcelWorksheet class and more particularly, in the gestures parameter
of the scriptHandler.script decorator.

I just created for that, it's available here :

https://github.com/nvaccess/nvda/pull/9492

Thank you for integrating this change into a future version of NVDA.

Best regards,
Abdel.








Re: Add Shift+Enter and Shift+numpadEnter for announcing previous cell in the same column in Excel

Jim Homme
 

Hi,
I have my Excel set up so that when I press Enter, the focus stays in the same cell. This way, I have to press arrow keys if I want to go to a new cell.

Jim



==========
Jim Homme
Digital Accessibility
Bender Consulting Services
412-787-8567
https://www.benderconsult.com/our%20services/hightest-accessible-technology-solutions

-----Original Message-----
From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Rui Fontes via Groups.Io
Sent: Monday, April 15, 2019 8:40 PM
To: nvda-devel@groups.io
Subject: Re: [nvda-devel] Add Shift+Enter and Shift+numpadEnter for announcing previous cell in the same column in Excel

Excuse me, but what Abdel wants is NVDA announcing the new cell where the focus go when pressing Shift+Enter...
Excel moves to the previous cell, but NVDA do not move the focus neither announces the new cell...

Rui Fontes


Às 18:41 de 15/04/2019, Jim Homme escreveu:
Hi,
Both keys are a key conflict with Excel. Also, the changes I am thinking about with Excel would have more things speaking with the key we already have, NVDA+TAB. Instead of the current cell only, I would have sheet name, column and row info, and current cell.

Jim



==========
Jim Homme
Digital Accessibility
Bender Consulting Services
412-787-8567
https://www.benderconsult.com/our%20services/hightest-accessible-techn
ology-solutions

-----Original Message-----
From: nvda-devel@groups.io <nvda-devel@groups.io> On Behalf Of Abdel
via Groups.Io
Sent: Monday, April 15, 2019 1:28 PM
To: nvda-devel@groups.io
Subject: [nvda-devel] Add Shift+Enter and Shift+numpadEnter for
announcing previous cell in the same column in Excel

Hi dear developers of NVDA,

I come back with a request I had already made in the past concerning the announcement of the current cell with Excel.

In principle, as the enter and numpadEnter keys announce the next cell in the same column, the shift+enter and shift+numpadEnter keys should announce the previous cell.

In fact, moving to previous or next cell is integrated by default in Excel, NVDA should just announce the current cell with each move.

I think it should be simple enough to implement, just add these 2 gestures in the 'NVDAObjects.window.excel.py' module, in the ExcelWorksheet class and more particularly, in the gestures parameter of the scriptHandler.script decorator.

I just created for that, it's available here :

https://github.com/nvaccess/nvda/pull/9492

Thank you for integrating this change into a future version of NVDA.

Best regards,
Abdel.






Re: Problem with fast browse mode - multiple NVDAObjects are created

 

Hey Tony,


I've quickly looked at the pr and the issue you're facing.


I don't think it is that strange that there are multiple python objects referring to the same content. For example, try the following:


>>> a=(1, 2)
>>> b=(1, 2)
>>> a==b
True
>>> a is b
False

Note that the == operator calls a.__eq__(b), whereas the word is is more strict, i.e. it directly checks whether this is entirely the same object.


I've seen this issue in other cases as well actually, totally unrelated to browse mode.


Regards,

Leonard

On 15-4-2019 13:50, Michael Curran wrote:

Hi Tony,


I would like to publicly apologize for not replying to your email around a month ago. I should have at very least explained that I did not have time to look at this at that point in time.


I still stand by my statement that I do think this work is important, and that I would like to see this in 2019.2. I also want to get this work in before speech refactor / Python 3. Therefore, I will in deed prioritize this now.


I need to clear my head enough to give this full attention and try and reconcile the issues I previously had with the PR. I am currently on personal leave but will be back next week and will start looking into it again then.


Thanks again for your contributions.


Mick










On 4/14/2019 5:06 AM, Tony Malykh wrote:

Hi Reef,
I appreciate your explanation.
1. I haven't heard from Michael for over a month. At this point I believe he saw my email and decided not to reply. I understand he was busy, but I can't believe he didn't have time to reply a few lines to me for over a month.
2. I believe I explained my problem clearly enough - duplicate  NVDA objects are created. The rest are details, test case, etc - you can find that in my previous emails in this thread.
3. I understand that you guys have your own set of priorities. However when you're saying that (and correct me if I'm wrong), it creates an impression that fast browse mode is not important or not worthy of Michael's reply. Here I pulled the list of 22 NVDA issues that I was trying to fix by fast browse mode (some of them are closed as duplicates):
    * nvda jumping the text box to enter the text to translate in google translator #8992
    * nvda 2018.4 beta 2 stuck in sum elements in web page #8999
    * Navigating quickly in edit fields on GMail causes NVDA to change from focus to browse mode unexpectedly #8211
    * When navigating the gmail page gsuite corporate inbox using the default view, nvda gets stuck in the navigation of the chat tabs #8111
    * NVDA cuts words and reports parts of different elements together on one key press; first occurance since nvda 2018.4 #9129
    * Internal focus handling seems quirky #5831
    * Browse mode problems with slow/inappropriate focus changes in browsers #2039
    * Losing Focus When Using Browse Mode #1544
    * Long pressing arror key will force to enter edit mode in firefox. #4719
    * In Firefox 37,when I move focus to a new line or control NVDA sometimes sets focus back to the previous line or control which had focus #5032
    * focus mode is activated due to caret movement sometimes randomly even when configured not to do so #5359
    * Firefox: Performance Degradation since merging #2039 Fix #5411
    * NVDA jumps when navigating on the web #2211
    * NVDA jumps to the bottom of the page when reaching the main landmark or heading level 1 on certain pages #4797
    * cursor moving backwards in navigation with the keyboard #2312
    * firefox edit fields: duplicate llines and words #3156
    * Sometimes focus jumps back to a previous web element in Firefox when arrowing down a webpage #4522
    * Internet Explorer 11 64 bit on windows 7 #6450
    * Timing issues in virtual buffers #6586
    * The user is unexpectedly dropped into focus mode on Twit.tv #6625
    * the cursor jumps backwards when browsing certain websites in Firefox, Chrome and Edge #7956
    * in chrome, sometimes focus is jumping #8013
So apparently NVDA users are bothered by bugs in NVDA browse mode as they keep creating new issues for years.
4. My attempts to fix all the bugs of fast browse mode take me deeper and deeper into NVDA internals. This particular problem with duplicate NVDA objects is very hard to fix. I could fix it for Chrome and Firefox by rewriting speech cache,but then in Internet explorer duplicate NVDA objects even have different IA2UniqueIDs, which makes it impossible for me to relate them. In edge there is another problem with focus event not being received, which I havn't started to look at. I was hoping to at least ask someone to explain to me what was the logic of creating NVDAObjects, when a new one is created as at a glance there doesn't seem to be any cache in NVDA code. But again, I received no reply. I was just trying to help NVDA, but it looks like my help is not very welcome here, Michael is only willing to be a passive code reviewer. Well, he's the boss here, but this attitude will make much harder for contributors to submit any pull requests longer than a few lines of code. Given all of that and given lack of my own free time, I'll not be working on fast browse mode anymore. I wish someone else could one day fix NVDA browse mode.
--Tony


On 4/10/2019 2:37 AM, Reef Turner wrote:
Hi Tony,

I can't speak for Michael, or the previous conversations that you have had. However, I can point out that this has been a very busy month for us at NV Access. We have had a week at CSUN AT conference (and got over the resulting jetlag), worked hard to get 2019.1 out the door and are pursuing a 2019.1.1 release. Michael and the rest of the team are taking some leave before we get into the work for the next quarter. I'm telling you this just to give some context.

Internal to NV Access, I'm sure you can appreciate that we have our own priorities and quite a busy schedule. The best advice I can give you for getting help on your project, is to try to distil the problem down to it's core, explain it is simply and succinctly as you can. You may find that there are other people on this list who can help.

On Tue, 2 Apr 2019 at 18:15, Tony Malykh <anton.malykh@...> wrote:
Hello Michael,

Did you see my previous emails?

--Tony



On 3/25/2019 3:12 PM, Tony Malykh via Groups.Io wrote:
> Hello Michael,
>
> I was wondering if I could have any assistance with this issue? I was
> under impression that you offered to help me with debugging fast
> browse mode PR... I haven't heard from you for more than two weeks, so
> should I keep waiting? Or did I misunderstand you and I'm own my own
> with this PR?
>
> Thanks
>
> --Tony
>
> On 3/20/2019 9:20 AM, Tony Malykh via Groups.Io wrote:
>> Moving this thread to new mailing list.
>>
>> [BCC old mailing list]
>>
>>
>> --Tony
>>
>> On 3/9/2019 2:49 PM, Tony Malykh wrote:
>>> Hello NVDA devs and especially Michael,
>>>
>>> I am trying to work on fast browse mode PR (a.k.a. focus follows
>>> browse mode off).
>>> Just a quick recap: In v1 of this PR there were some  bugs related
>>> to the fact that some logic was asynchronous and it relied on
>>> gainFocus event being received from the operating system. However in
>>> some cases for unknown reason operating system wouldn't send this
>>> event, causing bugs that are hard to deal with, such as inability to
>>> activate form elements on web pages.
>>> I am now working on v2:
>>> https://github.com/nvaccess/nvda/pull/9360
>>> The code is by no means ready to be reviewed, but it's just for the
>>> reference.
>>> The main change in v2 is replacing asynchronous logic with
>>> synchronous logic there, and in general it works, but there is one
>>> new bugI'm facing that I would like to discuss and maybe ask for
>>> some help.
>>>
>>> Basic description of the bug:
>>> When unchecking a checkbox on a web page, its new state is not being
>>> announced. The bug only reproduces for unchecking - that is checking
>>> previously blank checkbox works as expected.
>>> Here are the concrete steps to reproduce the bug.
>>> 1. Enter Fast browse mode by pressing NVDA+num row 8.
>>> 2. In Chrome or Firefox navigate to
>>> https://www.ironspider.ca/forms/checkradio.htm
>>> 3. Check the first 3 checkboxes on the page
>>> 4. Go back to the first check box
>>> 5. Press space to uncheck it. The check box will be successfully
>>> unchecked, but the new state will not be announced immediately.
>>>
>>> I spent some time debugging this , and here are my findings so far.
>>> Announcing state change works like this. First
>>> speech.speakObject(obj,controlTypes.REASON_ONLYCACHE) is called to
>>> cache the previous state. In traditional browse mode this function
>>> is called when user navigates to that checkbox, and therefore system
>>> focus is switched to that checkbox as well. This happens in
>>> BrowseModeDocumentTreeInterceptor.event_gainFocus.
>>> Then, assuming that user presses space bar on a checkbox,
>>> BrowseModeTreeInterceptor._activatePosition is triggered, which
>>> activates this checkbox. Shortly, in response to that we receive a
>>> state changed event, that is processed in
>>> NVDAObject.event_stateChange(), which in turn calls
>>> speech.speakObjectProperties(self,states=True,
>>> reason=controlTypes.REASON_CHANGE).
>>> So we make two calls to speech module: the first one to cache object
>>> properties, the second one to speak whatever properties have
>>> changed. Cached properties are stored inside NVDAObject, so it is
>>> very important that the same object is passed to both these calls.
>>>
>>> Now back to fast browse mode v2. Since we don't update system focus
>>> on every browse mode focus change, we need to update system focus
>>> right before activating the checkbox. This is accomplished in
>>> BrowseModeTreeInterceptor.maybeSyncFocus(). And in the same
>>> function, right after I call obj.setFocus(), I also call
>>> speech.speakObject(obj,controlTypes.REASON_ONLYCACHE).
>>> However, here is the problem. When we receive state changed event,
>>> the function NVDAObject.event_stateChange is called on a different
>>> NVDA object instance. So we completely miss the cached state.
>>> When I say a different NVDAObject instance, I only mean a different
>>> python object. So there are apparently (at least) two NVDAObjects,
>>> I'll call them NVDAObject1 and NVDAObject2. Both represent the same
>>> checkbox in the browser, both have the same IA2UniqueID and
>>> windowHandle. Yet in the first call (cacheonly) I see NVDAObject1,
>>> and the state changed event comes in with NVDAObject2.
>>> To illustrate this, here is the example from my logs (slightly
>>> formatted):
>>> cacheonly from maybeSyncFocus():
>>>     <NVDAObjects.IAccessible.mozilla.Mozilla object at 0x07A6A370>
>>>     uniqueID = (67548, -33555216)
>>> speakObject on stateChanged
>>>     <NVDAObjects.IAccessible.mozilla.Mozilla object at 0x07A6A1F0>
>>>     uniqueID = (67548L, -33555216)
>>>
>>> So the big question I have is why there are two separate NVDAObjects
>>> created for the same checkbox in my scenario? And why they are not
>>> created Without my PR? What is logic behind creating new NVDA
>>> Objects? I did some cursory debugging of that and I saw that most of
>>> NVDAObjects are created using function getNVDAObjectFromEvent()
>>> defined in IAccessible2\__init__.py, and there doesn't seem to be
>>> any caching logic there.
>>> It seems there are two potential approaches of tackling this issue.
>>> 1. We need to figure out why two separate NVDA objects are created.
>>> 2. Potentially another approach is to allow creating multiple python
>>> NVDAObjects for the same Checkbox (or any other real IAccessible2
>>> object), and have a properties cache that would take this into
>>> account. Some kind of weakKeyDictionary might work. Property caching
>>> logic in speech.py might have to be redesigned though.
>>>
>>> And also another thing worth noticing in the logs that I pasted
>>> above. UniqueID is a tuple of WindowHandle and IA2UniqueID . If you
>>> looked at both entries carefully, you would notice that WindowHandle
>>> is slightly different: even though the value is the same, in the
>>> first entry it is int, and in the second entry it is long. This
>>> looks very suspicious to me. Do you think this might be the reason
>>> why two copies of NVDAObjects are created? On the other hand it
>>> doesn't explain why two objects are not created in stock NVDA.
>>>
>>> Anyway, this is current state of my second attempt to implement fast
>>> browse mode. Any suggestions will be appreciated!
>>> Best
>>> --Tony
>>>
>>
>>
>>
>
>
>





--
Reef Turner
Software Developer 
 
Facebook: https://www.facebook.com/NVAccess 
Twitter: @NVAccess