Bug 56704 - ACCESSIBILITY: EnableATToolSupport value in LibreOffice registry is not being reliably set resulting in sporadic Java Accessibility AT support for Windows users
Summary: ACCESSIBILITY: EnableATToolSupport value in LibreOffice registry is not bein...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.0.0.0.alpha0+ Master
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on: 39833
Blocks: a11y-Windows
  Show dependency treegraph
 
Reported: 2012-11-03 02:22 UTC by V Stuart Foote
Modified: 2014-02-07 22:44 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description V Stuart Foote 2012-11-03 02:22:58 UTC
Enabling Java Accessibility in LOdev -3-7 with creation of the EnableATToolSupport stanza set true is not behaving consistently. 

I am working with David Ostrovsky’s MSVC2010 build of LibO master (as still no luck on successful TinderBox builds of Windows). So this is my first series of run throughs with the current master / 3-7 source. 

Following installation, LOdev launches and on this build the Assistive Tools checkbox will hold state--since you have to check the box, then exit LibO, then relaunch LibO--and does enable assistive tools. And Java Accessibility mappings via the JAB are exposing AT roles! So we can confirm that Java Accessibility via JAB occasionally works in windows LOdev master -3-7 branch.  

But it can not be consistently enabled from the GUI.

So I don’t think we can call it 100% reliable yet; because even if I was able to configure AT following installation, on subsequent launches I could not consistently get the AT checkbox to hold state.

=-=-= Set Accessibility after installation from Tools -> Options =-=-=

There seems to be a problem in creating the LibreOffice registry on first use.  I wipe it clean on each installation cycle, and during install I don’t use the “support assistive technology tools”--the enhancement of fdo#39833 (https://bugs.freedesktop.org/show_bug.cgi?id=39833 ).

To enable Assistive technology you first enable the Java Access Bridge. For JRE > 1.7u6 done from command prompte with "jabswitch /enable".  

Then in an LibreOffcie session navigate to the Tools -> Options -> Advanced – Java options panel which shows a checkbox “Use a Java runtime environment”.  

A list of JREs is populated--but there is no default radio button selection, even if just a single JRE is detected, the radio buttons are all blank and one of the JRE radio buttons must be manually toggled. If this selection code could be reworked to select a default (preferably one detected "with accessibility support", i.e. JAB) it would be useful.

Requirement for that: this JRE selection dialog is not exposed to Windows MSAA/IAccessible or UI dialog—so it is a blind selection for AT dependent users. Makes it a bit tough to correctly select a system JRE for Accessibility!

So, with a JRE selected, next on the Tools -> Options -> Accessibility tab try the check box “Support assistive technology tools (program restart required). And also the check box, “Use text selection in read-only text documents.”  I OK out and exit. Launch again and in the Options -> Accessibility menu “Use text selection in read-only text documents” has remained checked, but the “Support assistive technology tools…” does not.

Opened the registrymodification.xcu and manually edited the stanza for VCL:ConfigurableSetting['Accessibility'] EnableATToolSupport from false to true.  When I make that manual edit--on subsequent LibO launches AT roles were being exposed.

Verified that without the use Accessibility tool checkbox during installation, that no SAL_ACCESSIBILITY_ENABLED system environment variable gets created in registry from any of the toggle actions in Tools -> Options -> Accessibility. IIRC that is to be expected from what the fdo#39833 enhancement does.

=-=-=Set the "support assistive technology tools" checkbox during install =-=-=

So, I removed everything and on next install cycle--this round I checked the "support assistive technology tools" on the install panel. 

Andras Timar can probably explain better, but IIRC he could not directly set LibO registry values in registrymodification.xcu without doing MicroSoft Installer custom actions in the MSI package.   So instead installer sets an environment variable SAL_ACCESSIBILITY_ENABLED which gets read for each first use of LibO and based on that flag is supposed to write the VCL:ConfigurableSetting['Accessibility'] EnableATToolSupport set as true into each users registrymodification.xcu

But installing this way, in this LOdev -3-7 build, the registry creation process does not complete and the accessibility & assistive technology tools settings as well as the javasettings_Windows_x86.xml are not being fully created--it looks like they receive some minimal template that is not functional.

So, with this LOdev build, something is very broken with the "support assistive technology tools" install checkbox--added to the recently reopened fdo#39833. But neither method is resulting in reliable enabling of Assitive technology tools for Windows with Java Accessibility and JAB.
Comment 1 DavidO 2012-11-03 06:27:16 UTC
(In reply to comment #0)

> =-=-= Set Accessibility after installation from Tools -> Options =-=-=
> 
> There seems to be a problem in creating the LibreOffice registry on first
> use.  I wipe it clean on each installation cycle, and during install I don’t
> use the “support assistive technology tools”--the enhancement of fdo#39833
> (https://bugs.freedesktop.org/show_bug.cgi?id=39833 ).
> 
> To enable Assistive technology you first enable the Java Access Bridge. For
> JRE > 1.7u6 done from command prompte with "jabswitch /enable".  
> 
> Then in an LibreOffcie session navigate to the Tools -> Options -> Advanced
> – Java options panel which shows a checkbox “Use a Java runtime
> environment”.  
> 
> A list of JREs is populated--but there is no default radio button selection,
> even if just a single JRE is detected, the radio buttons are all blank and
> one of the JRE radio buttons must be manually toggled. If this selection
> code could be reworked to select a default (preferably one detected "with
> accessibility support", i.e. JAB) it would be useful.
> 
> Requirement for that: this JRE selection dialog is not exposed to Windows
> MSAA/IAccessible or UI dialog—so it is a blind selection for AT dependent
> users. Makes it a bit tough to correctly select a system JRE for
> Accessibility!
> 
> So, with a JRE selected, next on the Tools -> Options -> Accessibility tab
> try the check box “Support assistive technology tools (program restart
> required). And also the check box, “Use text selection in read-only text
> documents.”  I OK out and exit. Launch again and in the Options ->
> Accessibility menu “Use text selection in read-only text documents” has
> remained checked, but the “Support assistive technology tools…” does not.
> 

Could you please more exactly describe the steps to reproduce it? I tried it in that order and it worked for me (well tried it only once):

1. [unwind all current registry] => I only cleanly uninstalled all previous LO installation on my system... Is that enouph? If not provide exact description how these "unwind all current registry" should be done?
2. install LO-dev-3.7 (without any customisation during installation)
3. Selected JRE 1.7
4. Turned on the checkbox “Support assistive technology tools (program restart
 required" only
5. exit
6. start LO => checkbox “Support assistive technology tools (program restart
 required" is still checked

what am i missing?
Comment 2 V Stuart Foote 2012-11-03 15:58:43 UTC
I screwed up and did not bring home a copy of the MSVCR100D.dll to add to the LOdev install folder to run your debug version. And the online repo I'd grabbed it from is not running today. So I'm hamstrung on doing a load here for now.

>Could you please more exactly describe the steps to reproduce it? I tried it in >that order and it worked for me (well tried it only once):

The "...tried only once", is part of the issue. The check-box does not stay selected on subsequent launches of LibO. But then actually getting the AT working with JAB in a LibO session is hit-or-misss. Even if the the "use assitive technology tools" check-box is shown checked.

>1. [unwind all current registry] => I only cleanly uninstalled all previous LO >installation on my system... Is that enouph? If not provide exact description >how these "unwind all current registry" should be done?

Add/remove programs will remove the installed package.

But, from what Andras mentions in fdo#39833_comment 11, if you install the LOdev MSI from a command prompt (as opposed to just running it) and adding the WRITE_REGISTRY=1 switch a SAL_ACCESSIBILITY_ENABLED system environment variable gets written to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment. That variable doesn't get deleted, especially if you have another install of LibO 3.5 or 3.6 present. And having used the WRIT_REGISTRY flag, additional file associations are recorded in the Windows regsitry, but they appear to come off.

>2. install LO-dev-3.7 (without any customisation during installation)

I usually customize and remove French Spanish dictionary, Online Update, Active X control, Windows Explorer extension, Quickstarter and GNOME integration.

When I get a copy of the debug MSVC100D.dll I'll try with a typical check-box.

>3. Selected JRE 1.7

When the list of JREs is populated, if JAB is enabled it should show "with accessibility support"

>4. Turned on the checkbox “Support assistive technology tools (program restart
> required" only
>5. exit
>6. start LO => checkbox “Support assistive technology tools (program restart
> required" is still checked
>
>what am i missing?

Nothing, that is pretty much the way I install, but then I go ahead and open a document and activate an AT program (NVDA screen reader) or the javamonkey/javaferret Java Accessibility test tools.

For what ever reason it is hit or miss that the document actually exposes the UNO accessibility to the AT. Can open an close the document and LOdev ten times, but only have useable AT two or three times.

This from a single Windows login. I have not tested what happens if I logout and back in. Or even what happens if I reboot and come back in.
Comment 3 DavidO 2012-11-03 16:24:55 UTC
I uploaded the missing debug dll for you:

https://ci.idaia.de/job/MSVCR100D_libs/4/

I tried 5 times that test:
Exit LO, Start LO, Go to Tools -> Options -> Accessibility tab: 

* “Support assistive technology tools (program restart required)"
* “Use text selection in read-only text documents.”

are set and hold their state all five time.

Well, may be i should try the whole blown AT use case?
It would be of course simpler if i could reproduce the simplest case, though.

Note: i didn't messed around with any msexec command line options and didn't check Registry values.
Comment 4 Michael Meeks 2012-11-05 10:50:35 UTC
Lets talk code some more: so the SAL_ENABLE_ACCESSIBILITY thing is new to me - but sounds cool; and is implemented here:

http://cgit.freedesktop.org/libreoffice/core/tree/vcl/source/app/settings.cxx#n976

Looks like the registry key combines with the env. var in an odd way.

What is:

    if( mpData->mnEnableATT == (sal_uInt16)~0 )

That ~0 looks really reasonably unclear / unreadable to me.

SetEnableATToolSupport in that module appears to be called in anger only by the cui/ code when the option is changed, and/or when the user gets an a11y failure dialog at startup.

Does that help ? :-)
Comment 5 V Stuart Foote 2012-12-06 16:07:34 UTC
The 3.6.4 release restored JAB based accessibility to Windows users, but the per user profile/registry settings and Windows Registry settings are not reliably being set.

See this Accessibility ML thread: 

http://nabble.documentfoundation.org/libreoffice-accessibility-Latest-LibreOffice-and-Java-access-Bridge-tt4022968.html
Comment 6 Joel Madero 2012-12-06 20:46:04 UTC
I'm going to mark this as NEW as it's clearly being discussed already :) Hope we find a good solution
Comment 7 V Stuart Foote 2014-02-07 22:44:57 UTC
Setting resolved worksforme

With implementation of IAccessible2 for 4.2.0 release, and removal of JRE Java Accessibility API dependent on Java Access Bridge for 4.3.0 alpha+ builds, code was reworked to always enable AT tools support when an AT is detected in use.\\

Have not noted issues with the EnableATToolSupport with the current builds.