[Rd] Problem with accessibility in R 4.2.0 and 4.2.1.

2022-09-22 Thread Andrew Hart via R-devel
Hi. I'm having an issue with R 4.2.1 on Windows but I'm not sure if this 
is the right place to ask about it. If it's not, I'm hoping someone can 
point me in the right direction.


I'm blind and have been using R for about 11 years now. The base build 
available on CRAN is quite accessible and works pretty well with 
screen-reading software such as JAWS for Windows and NVDA. R-studio is 
not accessible which appears to have something to do with the version of 
QT it uses, but that's not relevant as I don't use it.


Recently I installed R 4.2.1 (I tend to upgrade two or three times a 
year and this time I was jumping from R 4.1.2 to 4.2.1).
However, I've encountered a serious problem which makes the latest 
version more or less unusable for doing any kind of serious work.
The issue is that the screen-reading software is unable to locate the R 
cursor and behaves as though the cursor is near the top left of the R 
application window. Practically, this means I can't tell what characters 
I'm passing over when cursoring left and right, nor can I hear what 
character is being deleted when the backspace is pressed. Most 
importantly, I can't tell where the insertion point is. This is a major 
regression in the ability to work with and edit the command line in the 
R console. There are ways of actually viewing the command line but the 
way I work is frequently calling up a previous command and making a 
change so as to not have to type the whole command again.


I Went and installed R 4.1.3 and R 4.2.0 in an attempt to find out 
exactly when things went awry and the issue first appeared in R 4.2.0.
Looking through the release notes, the only things mentioned that seem 
likely to be relevant are the following:


• R uses a new 64-bit Tcl/Tk bundle. The previous 32-bit/64-bit bundle 
had a different layout and can no longer be used.


and

• R uses UTF-8 as the native encoding on recent Windows systems (at 
least Windows 10 version 1903, Windows Server 2022 or Windows Server 
1903). As a part
of this change, R uses UCRT as the C runtime. UCRT should be installed 
manually on systems older than Windows 10 or Windows Server 2016 before 
installing

R.

I can't really see how changing to utf-8 as the native encoding would 
produce the behaviour I'm seeing, so I am guessing that the change in 
TCL/TK might be the culprit.


I'm hoping that someone will be able to help shed some light on what's 
going on here.


Thanks a lot,
Andrew.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Problem with accessibility in R 4.2.0 and 4.2.1.

2022-09-22 Thread Andrew Hart via R-devel

On 22/09/2022 16:42, Toby Hocking wrote:
Another option is to use https://emacspeak.sourceforge.net/ 
 (version of emacs editor/ide which 
can speak letters/words/lines -- has a blind maintainer) with 
https://ess.r-project.org/  (interface for 
editing and running R code from within emacs)


Thanks everyone for all the suggestions. Of course, the optimal solution 
would be to figure out what is going on in Rgui, but, as is always the 
case, the blind user use case is a fairly niche one. I appreciate all 
the suggestions for finding an immediate solution to my problem.
I don't use any kind of IDE for working with R since I simply haven't 
found one that is accessible or that i understand how to use. There is a 
plug-in for the Eclipse IDE I installed a few years ago, but I didn't 
understand the first thing about how it was to be used. So I've just 
always worked with an editor open in one Window and R in another,
working interactively in R or bouncing over to the editor for more 
complex things and sourcing code into R as necessary. However, I only 
use the R console in Rgui. I went and had a look at Rterm, which I have 
never used on Windows; I've only ever used it when ssh-ing into Linux 
systems to use R. However, I've just found out that Rterm does a number 
of fairly important things that probably mean I can just use it instead 
of Rgui:

1. You can paste from the clipboard into the Rterm prompt;
2. It has a command history;
3. If you plot something, it opens a Window to draw the plot (I never 
realised it could do this and had always assumed Rgui was needed for 
this); and
4. It opens the HTML help if you ask for help on windows. I only ever 
saw it display text help on Linux, but I was logged in remotely. 
Text-based help is fine when ssh-ing into a machine, but HTML help is 
much nicer to read and navigate.


I think I'll just switch over to Rterm for a while, but I can also check 
out ess, which I wasn't aware of.


Thanks a lot,
Andrew.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Problem with accessibility in R 4.2.0 and 4.2.1.

2022-12-21 Thread Andrew Hart via R-devel

HI Tomas,

Thanks a lot for not letting this go. It is truly appreciated. I had 
been using Rterm directly as Jonathan had suggested since we discussed 
this a number of months ago on the R-devel list. However, about a week 
and a half ago I accidentally launched Rgui for R 4.2.2 (which I 
installed around the end of October) and was surprised when I could 
actually  use it like I could use the pre-4.2 versions of R! I have been 
using it for a little more than a week now and was intending to write to 
you, but you beat me with this message.
The accessibility of Rgui 4.2.2 seems very similar to R 4.1.2 (which I 
still have on my system). In contrast, Rgui 4.2.1 is more or less 
unusable. I was wanting to ask you if perhaps something got changed in R 
4.2.2? Nothing jumped out at me in the release notes, but I could easily 
have overlooked something.


After reading this message, I went and checked the cursor blink setting 
in my 4.2.2 installation and it is indeed set to partial. You're right 
in that occasionally JAWS loses the cursor and the ability to read the R 
window. However, simply pressing the  key while Rgui has the 
focus fixes this. It seems that drawing a new command prompt on a new 
line sets JAWS straight and I am able to keep working. I haven't used 
4.1.2 for a while, but I think it had the same issue. I assumed that 
this was caused by moving from Windows 7 to Windows 10, since I never 
encountered this kind of issue in windows 7. I'll try out full cursor 
and see if that makes a difference in 4.2.2.


Also, I'll download the development snapshot and try it out. I'll let 
you know how I get on. Please excuse me if I don't get to it 
immediately; things are a bit crazy at work at the moment and it is that 
time of the year too!


Cheers,
Andrew.

On 20/12/2022 19:33, Tomas Kalibera wrote:

Dear Andrew, Jonathan,

I had a closer look and tried to improve accessibility in Rgui, please 
see below. I would be grateful for feedback.


Rgui supports three cursor types, which can be selected via Edit/GUI 
preferences/Cursor blink.


The default is "partial", but for screen readers, please use "full". You 
can change the selection in the menu and then "Save..." to save it into 
your Rconsole file. If you already have the file, the corresponding 
selection is "cursor_blink = Full".


The "full" cursor is implemented as the standard Windows "caret" and 
this is what screen readers can see. Once you set this cursor as the 
default in your Rconsole file and re-start Rgui, but before you start 
using the console, please switch focus out and back in (e.g. press 
Alt+TAB twice). This helps NVDA detect the characters under the cursor 
in already released versions of R. Please start the screen reader before 
starting Rgui.


I found that the "full" cursor implementation has a number of problems: 
in some situation it disappears when it shouldn't, in some the other way 
around. I thought this was confusing the screen reader, so I fixed most 
of these cases.


However, the true cause was that Rgui didn't create the cursor right 
when it got focus the first time. Luckily NVDA is open-source, so one 
can read and modify the source code to find out. I've added a 
work-around to Rgui, which is used only with the "full" cursor, because 
the "partial" cursor confuses the screen reader too much to be usable, 
anyway. So, after this fix, one doesn't have to do that focus out+in trick.


The improvements are in R-devel (revision 83482 or newer). I would be 
grateful if you could test it, so that it could be improved further (or 
reverted if it actually turned out worse). Particularly if you find a 
problem reproducible with NVDA, that should be something I could 
diagnose and improve, as I have the sources.


I've been testing with NVDA and I'd be curious about the impact on JAWS.
Rgui doesn't work with Narrator.

Thanks,
Tomas

On 9/22/22 23:15, Andrew Hart via R-devel wrote:

On 22/09/2022 16:42, Toby Hocking wrote:
Another option is to use https://emacspeak.sourceforge.net/ 
<https://emacspeak.sourceforge.net/> (version of emacs editor/ide 
which can speak letters/words/lines -- has a blind maintainer) with 
https://ess.r-project.org/ <https://ess.r-project.org/> (interface 
for editing and running R code from within emacs)


Thanks everyone for all the suggestions. Of course, the optimal 
solution would be to figure out what is going on in Rgui, but, as is 
always the case, the blind user use case is a fairly niche one. I 
appreciate all the suggestions for finding an immediate solution to my 
problem.
I don't use any kind of IDE for working with R since I simply haven't 
found one that is accessible or that i understand how to use. There is 
a plug-in for the Eclipse IDE I installed a few years ago, but I 
didn't understand 

Re: [Rd] need help from someone know screen reader and R high DPI GUI

2023-02-08 Thread Andrew Hart via R-devel
I'd be willing to give it a go if a pre-build binary set-up could be 
provided.


Cheers,
Andrew.

On 8/02/2023 6:39, yu gong wrote:

hello , everyone:

  I recheck and retest about the patch about high dpi of windows R GUI ,  IMO 
it works mostly. Last thing I am not sure is screen reader.

  I download NVDA screen reader, and try it on high dpi R GUI , in NVDA Speech 
viewer,  it seems it can read R GUI normally, but since I konw so little about 
screen reader before.   I couldn't confirm NVDA Speech viewer indeed work on 
high dpi R GUI.

Could anyone who know screen reader , help me  to confirm the high dpi patch 
not break screen reader.

I put the patch 
https://github.com/armgong/misc-r-patch/blob/main/dpi-c-code.diff  .

If anyone need the compiled binary on windows x64 , I can upload it on github 
repo also.

thanks,

Yu Gong


[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel



__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel