[jawsscripts] Re: QT framework and MuseScore

  • From: Doug Lee <doug.lee@xxxxxxxxxxxxxxx>
  • To: "jawsscripts@xxxxxxxxxxxxx" <jawsscripts@xxxxxxxxxxxxx>
  • Date: Fri, 3 Jan 2020 02:28:15 +0000

Per usual for my projects as of last year that are not part of contracts, I 
could not include source code in what I just posted. However, I can tell you a 
few things in case you need to know them, and we can discuss what should
happen from here. In truth, when I zipped off and wrote those quick scripts, I 
forgot that you might be trying to write scripts yourself; and if so, I don't 
know if you have an existing arrangement with the app developer.

Announcement of notes uses the AccValue method on the focused MSAA object in a 
score to get the material to speak. I did not do any translation; I just speak 
that information on a SayLine command.

The status line code, in a nutshell:
* Get top-level window handle.
* Get MSAA object from this using GetObjectFromEvent().
* Get the status bar object with o.accChild(1), where o is the above object.
* Loop from 1 to oStatus.accChildCount and pull accName values to get what to 
speak. Mind, some are blank.
* For one of the items, there is an accDescription value; and it and the 
accName are in fact three values and names. I translate that into desc1 name1, 
desc2 name2, desc3 name3 format.
* The JAWSKey+PgDn command just reads all that, whereas the [ 1-9 command 
sequences read individual MSAA elements.
* I have code to name combo boxes and radio buttons that is a bit more involved 
and may help with the tours that your doc says are not yet accessible.

On Thu, Jan 02, 2020 at 07:18:35PM -0700, Peter Torpey wrote:
CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe.


Doug,

Wow!  I hadn't expected you to do all of that, but thanks.  This sounds like
a great start.  I'll take some time tomorrow and over the weekend to look
over what you've done.  Sounds nice.

Just FYI, I think that NVDA only speaks the notes, note values, bar/beat
info, etc. when in the note entry mode.  If I hit escape (just to make sure
I start at the right point in the process) and then "n" I am placed in a
mode where hitting the right/left arrow keys with NVDA not only sounds the
note but also speaks all of that other info.  As the MuseScore developer
indicated, I don't think all of that speaking info is coming from the Status
bar, since what I hear with NVDA is not only some of that info in the status
bar but also minus some of the info and plus a bit extra.  I don't know why
you wouldn't have heard this with NVDA.

Anyway, thanks.  Give me some time to check this out.

--Pete


-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx <jawsscripts-bounce@xxxxxxxxxxxxx> On
Behalf Of Doug Lee
Sent: Thursday, January 2, 2020 6:30 PM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: QT framework and MuseScore

Ok, got the non-beta, and a lot more info and even some scripts!

The beta and the non-beta both use Qt versions that support MSAA better than
UIA. The beta's MSAA structure is nearly empty though, whereas the stable
release has decent accessibility info by comparison.

The reason my beta version would not launch is that closing it with Alt+F4
left the app running as a background process with no windows. Killing this
process from the Task Manager did let me relaunch, but the windows were
again completely unreadable with JAWS.

All of what follows concerns only the stable (non-beta) MuseScore release,
which works well here:

The structure is typical MSAA for this Qt version: An Application object at
the top, with all windows and elements descending from it. With this Qt
version, UIA should not be needed.

My NVDA, latest stable release, does not say anything on Left and Right, or
even Up and Down arrows in a score. Notes do play, however. I therefore
don't know for certain what is currently expected by JAWS users that have
used NVDA.

Having scripted for a few of these apps, I had some thoughts and code to
bear offhand; so, there are now some experimental scripts for the stable
MuseScore version at https://www.dlee.org/musescore/

What you'll find at that address is a user guide for the scripts. The guide
contains a download link for a professional installer for the scripts
themselves. At this writing, I allow the scripts to install into any JAWS
version as far back as 2015, though I only tested them under JAWS 2020.

Script features are listed in the guide; but in summary, at present they are

* Better announcement of combo box and radio button controls.

* Instructions for the user to use Left and Right arrows for radio buttons,
because Up and Down arrows do not work in this application for those.

* SayLine (Insert+UpArrow) reads the current note in a score. Note though
that it only reads the last note added if the current position contains more
than one.

* The JAWSKey+PgDn command for reading the status line works in this
application, though it natively would not.

* Key sequence [ 1 reads part 1 of the status line, [ 2 the second, etc. (A
key sequence is a set of keys typed one at a time, not together at once.)

On Thu, Jan 02, 2020 at 02:35:54PM -0700, Peter Torpey wrote:
CAUTION: This email originated from outside of the organization. Do not
click links or open attachments unless you recognize the sender and know the
content is safe.


Doug,

Here is the documentation for using MuseScore 3 with a screen reader:
https://musescore.org/en/handbook/3/accessibility

As I remembered, it seems like one should just be able to start using the
program since, after dismissing the "Quick Start" menu by hitting escape,
the program opens with a blank score.  From there I just hit "N" to get into
note entry mode and start typing notes.  Then arrow keys will move between
notes and alt+arrow between elements such as notes, key signatures, etc.
NVDA speaks all of this while JAWS does not.

Hope that helps.  You might want to at least try NVDA just to see how nice
the experience is!  Don't know if the problems you are seeing is just
because it is a beta.

--pete


-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx <jawsscripts-bounce@xxxxxxxxxxxxx> On
Behalf Of Doug Lee
Sent: Thursday, January 2, 2020 2:12 PM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: QT framework and MuseScore

Well my experience so far is a bit problematic:

I downloaded the beta, figuring that would be the best version to use while
working with developers.

I installed with default settings and launched, but all I saw was a single
window with no MSAA or UIA.

Per your directions from earlier in this thread, I tried pressing Esc a few
times, but with no effect. I then typed Alt+F4, and this closed the current
window and left me in a MuseScore Startup window.

I again tried Esc a few times, then typed Alt+F4 again. The application
closed.

I then tried running the application from both the Desktop window and the
Start screen programs entry, but nothing happens; the app will not launch
and there is no error message.

On Thu, Jan 02, 2020 at 02:06:43PM -0700, Peter Torpey wrote:
CAUTION: This email originated from outside of the organization. Do not
click links or open attachments unless you recognize the sender and know the
content is safe.


Doug,


Here are two more replies from one of the MuseScore developers that might be
helpul.



First, in response to my reply about various ways JAWS scripts can find
info:

"This is great information, thanks! Seems like it should be possible to get
this working, then. For instance, the info in the status bar is, while not
ideal, better than nothing, so if you knew how to find the status bar and
read when it changed, that's something right there. Does the JAWS tool you
have see the status bar? Should show as a standard status bar type of
widget. We don't deal with Windows directly, everything goes through Qt,
which is what enables us to be cross platform. So I can tell you Qt object
names etc, maybe they relate in some way you can use? Or maybe unstead of
reading the status bar, you can access the scoreview widget directly and
grab that accessible text we are placing there. One of the names you could
look for, if you have a way of finding this, is "Ms::ScoreView"."

Comment from Pete: At a quick glance using the JAWS script utility mode I
didn't see the windows that he describes, but I'll take another closer look.
I don't know if I

can use the JAWS GetWindowClass() and other functions to do this or if I
have to use some special MSAA or UIA constructs.



The second comment is about why they use the version of QT that they do:

"We do currently use 5.9.8, although we briefly flirted with using 5.12.5,
and I recall that the MSAA to UIA change was one of the reasons we wanted
to. 5.12.5 seems to work better for accessibility in some ways but led to
problems elsewhere, so we rolled back. If it helps, I'm also happy to try to
make sure we provide a 5.12.5-based build for accessibility purposes."

Comment from Pete: Again, depending on how JAWS can access this information
I don't know whether it is worth asking them to put together a version of
MuseScore based on the later version of QT or not.  Looks like they are
willing to work with us though, so that is always good news!



Anyway, let me know your thoughts since I think you have much more
experience in this arena than I do.



Thanks again.



--Pete







__________???

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

--
Doug Lee, Lead Accessibility Architect
Level Access - over 1,000 organizations trust us to help them achieve and
maintain digital accessibility compliance!
mailto:Doug.Lee@xxxxxxxxxxxxxxx  http://www.LevelAccess.com "While they were
saying among themselves it cannot be done, it was done." --Helen Keller
__________o?=

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


__________???

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

--
Doug Lee, Lead Accessibility Architect
Level Access - over 1,000 organizations trust us to help them achieve and
maintain digital accessibility compliance!
mailto:Doug.Lee@xxxxxxxxxxxxxxx  http://www.LevelAccess.com "While they were
saying among themselves it cannot be done, it was done." --Helen Keller
__________o?=

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


__________???

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

-- 
Doug Lee, Lead Accessibility Architect
Level Access - over 1,000 organizations trust us to help them achieve and 
maintain digital accessibility compliance!
mailto:Doug.Lee@xxxxxxxxxxxxxxx  http://www.LevelAccess.com
"While they were saying among themselves it cannot be done, it was done." 
--Helen Keller
__________�

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

Other related posts: