Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status bar handling: allow app modules to define their own routines to fetch status bar and use it in status bar command in global commands #4640

Closed
nvaccessAuto opened this issue Nov 21, 2014 · 13 comments · Fixed by #9792
Milestone

Comments

@nvaccessAuto
Copy link

Reported by nvdakor on 2014-11-21 19:15
Hi,
Some developers at NVDA development list proposes the following:
As there are situations where one may wish to emulate a status bar and/or read a particular status bar when an app has more than one status bar, let NVDA query the app module for a routine for fetching the desired status bar object before resorting to using status bar routine defined in API module. If this is implemented, it would open new possibilities for app modules to specify which status is which or provde a "fake" status bar. Some of the possibilities are:

  • If an app has two or more status bar objects, let the app choose which one to indicate as a status bar.
  • If an app doesn't have a status bar yet if the user wishes to hear status information, then allow NvDA to announce the "fake" status bar i.e. the status information.
    This second scenario would allow an app module like that of Vim to let the user hear important status information using a familiar command.
    Implementation strategies and current situation:
  • If one wishes to modify how the status bar is returned, one needs to modify NVDA core. This isn't ideal for add-on writers.
  • For some apps, NVDA returns "no status bar found" when there is info displayed somewhere (Vim is a good example).
  • One way to get around this issue is to introduce a routine in base app module that can be overwritten in subclasses to return the desired status object, or if one desires, a routine that simulates a status bar. Then in global commands, have NvDA check to see if the app module for the object has this new routine, and if not, resort to using the core routine for fetching status bar objects.
  • For consistency, the app module routine should set navigator object to the desired status object. A major issue is if we have no status bar objects and if the app module simulates a status bar. Thus the base app module should take care of setting navigator object to the desired status object, with subclasses doing their work and optionally would call the super method if need to.
    Thanks.
@nvaccessAuto
Copy link
Author

Comment 1 by jteh on 2014-11-22 04:52
Doing this at the app module level is probably not ideal, as there could be multiple top level windows in an application. It's probably better to do it on the foreground NVDAObject.

Out of interest, does Vim actually have a status bar object? If so and it's at the bottom of the screen, you just need to give it ROLE_STATUSBAR. If not, where does the status bar information come from?

@nvaccessAuto
Copy link
Author

Comment 2 by lpintes (in reply to comment 1) on 2014-11-22 08:14
Replying to jteh:

Out of interest, does Vim actually have a status bar object? If so and it's at the bottom of the screen, you just need to give it ROLE_STATUSBAR. If not, where does the status bar information come from?

The Gvim has a window which tries to simulate the console. So there is no status bar object. I need to parse the displayText property and extract the last line.
An interesting thing about Gvim's displayText is that there are no line separator, perhaps due to its "console nature", so I need to split the whole text to chunks. But this is slightly OT in this context.

@nvaccessAuto
Copy link
Author

Comment 3 by jteh on 2014-12-01 04:46
NVDA's report status line command should already be trying the bottom line of screen review if getting a status bar object fails. Do you have any idea why this doesn't work in this case? What happens if you go into screen review and then read the bottom line?

@nvaccessAuto
Copy link
Author

Comment 4 by lpintes (in reply to comment 3) on 2014-12-01 08:12
Hi,
In case of Gvim, displayModel does very bad job indeed. The reportStatusLine script reports "Status bar not found". This is perhaps correct, because there is no status line object.
When you activate the review mode and go directly to the last line, NVDA stucks on something that is reported as empty or blank.
However if you are reviewing line by line, the bottom line can be read.
The Gvim window layout is perhaps a bit weird. There is a window with window class "Vim". This is the window with focus.
Text is drawn to the window with window class "VimTextArea". Then there is a toolbar and in some cases the page control. I don't know if this layout causes problems with displayModel.

@nvaccessAuto
Copy link
Author

Comment 5 by jteh (in reply to comment 4) on 2014-12-01 09:47
Replying to lpintes:

In case of Gvim, displayModel does very bad job indeed.

It's worth noting that displayText is also display model. :)

The reportStatusLine script reports "Status bar not found". This is perhaps correct, because there is no status line object.

There doesn't have to be a separate object in this case. Even so, it should just be saying blank. I see that script still uses flatReviewPosition, where it should probably instead use review.getScreenPosition.

When you activate the review mode and go directly to the last line, NVDA stucks on something that is reported as empty or blank.

However if you are reviewing line by line, the bottom line can be read.

Interesting. How many blank lines are there after the status line?

@nvaccessAuto
Copy link
Author

Comment 6 by lpintes (in reply to comment 5) on 2014-12-01 10:19

Interesting. How many blank lines are there after the status line?

I noticed four things here:

  1. a "~" as an indication of end of text
  2. the normal text, a text one is currently editing
  3. a garbage, i.e. the display model is updated incorrectly for some reason
  4. one empty line above "Press enter or type command to continue", the screen may be cleared in this case, I am not sure, so this look like one empty line

But the thing I reported, i.e. it is impossible to go directly to the bottom of the flat review, because NVDA is stuck on something "blank" is true in any case.

@leonardder
Copy link
Collaborator

CC @josephsl @jcsteh

In #6769, @feerrenrut posted some relevant tickets for this:

  • Unable to find status bar in Visual Studio Ref bug #5618
  • Unable to find status bar in Office aplications #649
  • Status bar handling does not work with Java Access Bridge applications #5674

@Adriani90
Copy link
Collaborator

@leonardder, @josephsl, @jcsteh any updates on this issue?
@ABuffEr you have created the add-on toolbars explorer. I think your thoughts are very appreciated in this regard. Thanks.

@josephsl
Copy link
Collaborator

josephsl commented Jan 4, 2019

Hi,

We may need to gather more data before proceeding with this. Thanks.

1 similar comment
@josephsl
Copy link
Collaborator

josephsl commented Jan 4, 2019

Hi,

We may need to gather more data before proceeding with this. Thanks.

@ruifontes
Copy link
Contributor

ruifontes commented Jan 5, 2019 via email

@josephsl
Copy link
Collaborator

josephsl commented Jan 5, 2019 via email

@ruifontes
Copy link
Contributor

We have this ticket open since November of 2014...
#2125 was opened in February of 2012 and is closed...
#6769 is open since January of 2017...

How long we are gonna wait to solve this problem?

feerrenrut pushed a commit that referenced this issue Apr 30, 2020
…9792)

Add at AppModule level:
-  _get_statusBar : For use by api.getStatusBar to retrieve a custom object
-  _get_statusBarTextInfo : For use by GlobalCommands.script_reportStatusLine when resorting to flat review.

Fixes #2125
Fixes #4640
@nvaccessAuto nvaccessAuto added this to the 2020.1 milestone Apr 30, 2020
@feerrenrut feerrenrut modified the milestones: 2020.1, 2020.2 Apr 30, 2020
michaelDCurran pushed a commit that referenced this issue Nov 24, 2021
…ken over after abandoned #12371 (#12845)

Fixes #6769
Superseedes #12371

Summary of the issue:
Currently, the Window File Explorer cannot be retrieved using the reportStatusLine global command.

Description of how this pull request fixes the issue:
• Take advantage of Status bar handling: allow app modules to define their own routines to fetch status bar and use it in status bar command in global commands #4640 to implement custom status bar retrieval by the explorer app module.
• Use a UIAWalker to retrieve it, as hinted by @josephsl in Can't read status bar in File Explorer (Windows 10) #6769 (comment)
• Still, instead of overlaying the status bar of its children for concerns expressed in Can't read status bar in File Explorer (Windows 10) #6769 (comment), allow app modules to provide their custom implementation of api.getStatusBarText
• Implement explorer.AppModule.getStatusBarText as inspired by @ruifontes prototype in Nvda utters unavailable after copying files #6842 (comment) (hinted by @feerrenrut in Can't read status bar in File Explorer (Windows 10) #6769 (comment)) but in a slightly more complex way - trying to cover more unexpected cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants