-
-
Notifications
You must be signed in to change notification settings - Fork 651
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
UI Automation in Windows Console: improve reliability of visible range checks #9957
Conversation
…ls and disable the console bounds checking code when oldRange is also offscreen.
…ges to fix review top/bottom scripts.
source/UIAUtils.py
Outdated
UIAHandler.TextPatternRangeEndpoint_Start, lastVisiRange, | ||
UIAHandler.TextPatternRangeEndpoint_End) >= 0 | ||
else: | ||
# Visible ranges not available, so fail gracefully. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not raise an error here and catch that when calling?
source/UIAUtils.py
Outdated
@@ -172,6 +172,23 @@ def getChildrenWithCacheFromUIATextRange(textRange,cacheRequest): | |||
c=CacheableUIAElementArray(c) | |||
return c | |||
|
|||
def isTextRangeOffscreen(range, visiRanges): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change the range
argument so it does not shadow the builtin function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall the code looks ok, though from the PR description it's not really clear what use-cases this enables. After some playing with it I think I know what is going on, but it would be nice for others if there were steps (specifying key presses) to demonstrate.
While here I also think it is worth mentioning that you can also use incrementally select text with shift+up/down/left/right arrows
, I was able to read many screens by:
shift+home
, to select back to the first columnshift+up arrow
, to select previous lines. Of course the lines are in reverse order.shift+down arrow
to then unselect the text and hear it in the right order.
As we discussed selecting and jumping by word (control+shift+left/right arrow
) is broken when NVDA is running.
Can you update the user guide to mention control+up/down arrow
and control+home/end
to scroll the console window, since it's not obvious how you would know about it.
Also as mentioned, please change the param name from range
to textRange
Where in the user guide should this be mentioned? Also, since this is a Windows Console feature (not an NVDA one) should this still be in the NVDA user guide? It seems that we tend not to put application commands in the NVDA docs (i.e. if the command still works without NVDA on, we usually don't mention it). |
It's true that we tend not to do this. However, it's quite a useful thing to know how to do when using NVDA, and not very discoverable. If there was not a built in feature, we would be trying to implement something similar I expect. Overall I think a short guide to using the Windows Console is quite appropriate.
You can add a subsection to
|
Just updated. It's not exactly clear what control+home actually does though, so I didn't mention it yet. |
|
Co-Authored-By: Reef Turner <feerrenrut@users.noreply.github.com>
…into cmduia9-offscreen
"new text is written, the content scroll upwards and previous text is no longer
visible."
"Scroll" s/b "scrolls".
|
Link to issue number:
Builds on #9614. Supersedes #9735 and #9899. Closes #9891.
Summary of the issue:
Currently:
Description of how this pull request fixes the issue:
This PR backports some functionality from #9735. In particular:
isOffscreen
property has been implemented asUIAUtils.isTextRangeOffscreen
.POSITION_FIRST
andPOSITION_LAST
in terms of visible ranges.Testing performed:
Repeated testing from #9899 and verified that the review top/bottom scripts are functional.
Known issues with pull request:
Change log entry:
== Changes ==