[jawsscripts] Re: Which function announces the short keys?

  • From: Csaba Godo <arpadhazi68.jawsul@xxxxxxxxx>
  • To: JAWSScripts List <jawsscripts@xxxxxxxxxxxxx>
  • Date: Wed, 13 Feb 2019 16:00:06 +0100

Hi Jonathan,

after a long search, it was found out which is the event function that 
announces the keyboard shortcuts. This is the following:

void function tutorMessageEvent(handle hwndFocus, int nMenuMode)

Now I can supress it during my HTA handler framework loading.

I think you misunderstood what I wrote about changing the label of a 
checkbox. In many cases, in Windows itself, if you check a checbox also 
the label is changing. For example by file copy. In the flyout dialog 
you find a checkbox about showing details. As default it is unchecked 
and its labeltext is "More detayils". If you check, it will be checked, 
of course and also the labeltext is changing to "Less details". I wanted 
to mimic this behaviour in my HTA framework. In this case If the 
activated checkbox has the focus, JAWS does not announces correctly the 
labeltext. After changing it announces still the old text, because the 
in-memory XML file JAWS uses to announces webcontents is not refreshed. 
But I could manage the correct announcement. I found the right JAWS 
event and after some customization my framework handles correctly the 
case of "run-time changed labels".

Take care,

Csaba


2019. 02. 11. 2:10 keltezéssel, Jonathan Cohn írta:

Adjusting the label is not really appropriate for changing a checkbox, 
the checked property  should be used. Of course, I have no way  of 
knowing if Microsoft provides the appropriate feedback back to the 
screen reader when state changes. I suggest you post your response to 
the list, since there are several members of the list who do more JAWS 
scripting than I do

Best wishes,

Jonathan Cohn



On Feb 10, 2019, at 7:12 AM, Csaba Godo <arpadhazi68.jawsul@xxxxxxxxx 
<mailto:arpadhazi68.jawsul@xxxxxxxxx>> wrote:

Hi Jonathan,

I'm working on a JAWS extension project called JAWS.UI  (JAWS Script 
User Interface) which uses Microsoft'S HTML Application technology 
(called HTA) to  make possible display custom dialogs written entirely 
in HTML/CSS/VBScript. HTA is part of Windows systems since Windows 98 
and were introduced as helping tool for system administrators to build 
sofisticated full scale apps to maintain systemm stuffs. Also 
Microsoft is used it to develop application installers like the 
installer of Visual Studio 2010 or 2013.

Now I work on the generalized wrapper script that allows the data to 
be exchanged with the displayed HTA window.  A HTA app ist nothing 
else than a simple HTML file with .hta extension and contains a 
special <HTA> tag in its <head> section. Becauseof the <hta> tag HTA 
files can not be opened in regular browsers. They run with MSHTA.exe, 
which is shipped with Windows and part the Windows Scripting stuff. 
MSHTA.exe is nothing other than an "unrestricted IE running 
environment" where only the HTML rendering jet is active, so you can 
reach the entire operation system from a HTA app without any security 
issue. Because MSHTA.exe is based on IE as default JAWS loads the 
"Internet Explorer" script if a HTA file is opened. I modified the IE 
script's AutoLoadEvent function and if MSHTA.exe is running than I 
switch to my custom script. This script as I mentioned is a 
generalized wrapper script to handle opening, loading and interacting 
with the displayed HTA forms from the caller script. This script 
contain also functions to simplify interactions with the HTML content 
of the HTA file. They are nothing others than wrapper functions of 
some JAWS Script HTML functions which make possible to reach directly 
the DOM object and interact with it through javascript.

I would like to make possible to change textsrun-time. Ie. if I click 
a checkbox that has the focus I call a JAWS script which changes its 
label text. I see on the screen that the text is changed according to 
the script but JAWS announces the old thext if I query it with the 
SayLine function. If I move toward the focus from this element to the 
next one and back than JAWS announces already the element's label 
correctly. So my problem is how I could urge JAWS to refresh the text 
in the virtual document without moving the focus.

Also on webpages handle focus movements the regular JAWS focus change 
event scripts. So if the focus moves to a control some of them could 
be use to modify the announcement.  My technique is that I bypass the 
FocusChangedEvent  in the MSHTA script file if I move the focus toward 
from the control which label text modified . So JAWS does not says 
anything during focus movement actions.  It works fine if the control 
has no accesskey property defined (namely has no shortcut key) but in 
otherwise  JAWS does not announces the control itself but its 
accesskey property as shortcut.  From this scenario I guess that the 
fuction called to announce shortcut keys is a scheduled one.
You can ask why I do not switch of totally the speech. Because I had 
some bad experiences with it so I avoid it if possible. I want to 
avoid jaws becoming unusable.

By the way my HTA user interface system is based on a not documented 
JAWS feature existing since JAWS can handle domain specific scripts. 
The feature is that JAWS automatically loads (or try to load) the 
script named like the opened HTA form. If MSHTA exe is starting, JAWS 
loads automatically the IE script. As mentioned I customized the IE's 
AutoLoadEvent and in case of running mshta.exe JAWS loads my 
generalized wrapper script for MSHTA forms. After it is loaded JAWS 
automatically loads the script for the opened hta file.

With simple linking I prevent JAWS to download this generalized HTA 
handler script from the memory, so its functionality is available also 
in the file specific script.
Because the script written for the opened HTA file can be easily bound 
to the caller script (the user interface of which it displays) so real 
interaction and data change can be achieved trough it between the 
processes. I think JAWS Script lacks this feature (the feature of 
creating real and unrestricted user interface for scripts) since the 
early beginnings. (Like you could do in WindowEyes due its built-in 
VBA support.) The built-in features of JAWS are only limited  to 
display a list dialog, or one of the user buffers.

HTML is the only possiblity for us, vor visually impaired persons, to 
design and build easily Windows standard-like user interfaces. With 
usage of a predefined simple CSS framework and jQuery or 
VBScriptlibraries, and with help of predefined dialog templates it is 
really very easy to display anything from scripts in a very 
userfriendly way. The JAWS scripting solution  structure allows direct 
data exchange between the script and the form unlike previous attempts 
where most often INI files were used for this purpose. In these cases 
displayed forms were "out of bounds" of the caller script. With this 
solution, the form displayed becomes an integral part of the script, 
as interventions on the form can even trigger events in the calling 
script.

The case that brought this project to life was a mandatory necessity 
to be able display checkboxes in a project where I had to solve the 
script setup options with no keyboard shortcuts, but like a windows 
application i had to display a "Settings" window. It could be not 
solved with the help of the built-in JAWS features. I used and loved 
HTA 's also before I became visually impaired.So also in this case I 
try to use it And since I managed to solve it and work very well, I 
thought I would create a generalized version that runs as a "user 
interface manager subsystem" in JAWS, allowing every scripter to 
create a user interface for any of their scripts.

Take care,

Csaba


2019. 02. 09. 22:49 keltezéssel, Jonathan Cohn írta:
Seem to be a few questions here, and I had a little trouble 
understanding your actual question.
First, are you developing a web site, or are you attempting to script 
a site you don’t have access too.
If you are a web developer you should look into ARIA but make sure 
you understand the principles of ARIA design. Progress Bars and the 
state of buttons will get announced as they change. Also, the text of 
live regions gets announced.
You also mentioned FocusChangeEvent but I am not sure if you are 
calling this in a script or trying to manipulate the results. 
Generally, JAWS will not read changes in items that do not have focus.
Take care!
Jonathan
On Feb 9, 2019, at 4:36 PM, Csaba Godo <arpadhazi68.jawsul@xxxxxxxxx 
<mailto:arpadhazi68.jawsul@xxxxxxxxx>> wrote:

Hi everybody,

Could somebody tell me, which function announces on webpages the
element's access key?  Or in general, how are announced the schortcut
keys in case of desktop applications?

If I bybass a HTML element's announcement in FocusChangedEvent function,
the access key is still announced if the element gets focus.

And a second question: how would be possible to refres the virtual o
document JAWS uses to announce HTML pages. The scenario is the
following. After loading a HTML page I make same changes in the selected
(ie. the first) element of the page with the .innerHTML jscript method.
This changes are displayed immediately on the screen but JAWS does not
recognize ituntil I move the focus towards and back to the element. Then
it announces correctly. But without moving focus away from changed
element JAWS announces the original (ie. the wrong unchanged) text.

Thanks for any help!

Csaba
__________�

View the list's information and change your settings at
http://www.freelists.org/list/jawsscripts

__________�
View the list's information and change your settings at
http://www.freelists.org/list/jawsscripts

__________�

View the list's information and change your settings at 
http://www.freelists.org/list/jawsscripts

Other related posts: