Issue 121510 - Accessibility broken with Java7
Summary: Accessibility broken with Java7
Status: CLOSED FIXED
Alias: None
Product: ui
Classification: Code
Component: AccessBridge (show other issues)
Version: AOO 3.4.1
Hardware: PC Windows, all
: P3 Normal with 2 votes (vote)
Target Milestone: ---
Assignee: jsc
QA Contact:
URL:
Keywords: accessibility-external
Depends on:
Blocks: winA11y
  Show dependency tree
 
Reported: 2012-12-19 11:37 UTC by Michael Whapples
Modified: 2017-05-20 09:26 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---
jsc: 4.0.0_release_blocker+


Attachments
reworked and combined patch (5.54 KB, patch)
2013-07-09 08:18 UTC, jsc
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Michael Whapples 2012-12-19 11:37:19 UTC
When OpenOffice.org is set to use Java7 JRE the accessibility with screen readers such as NVDA becomes much less. Some examples would include NVDA not speaking items as tabbing around the options dialog, by default starting OpenOffice.org writer NVDA does not detect it is within the document view, etc. NVDA developers have indicated that they are not recieving events from OpenOffice when using Java7, see the NVDA bug ticket http://www.nvda-project.org/ticket/2870

When using Java6 with OpenOffice on the same computer the accessibility is far better, however as Java6 will not be recieving further updates from Oracle after Feb 2013 it would be best if Java7 support worked properly.

I am not sure what logs/debug output may be useful for solving this, if you let me know and how to generate the output I can produce output of it.
Comment 1 Ariel Constenla-Haile 2012-12-19 11:50:20 UTC
When using Java 7 please note that it must be a 32 bits version, and make sure you have the Microsoft Visual C++ 2010 Redistributable Package

See the release notes: http://www.openoffice.org/development/releases/3.4.1.html#AOO3.4.1ReleaseNotes-KnownIssues

Apache OpenOffice 3.4.0 and 3.4.1 support Java 7, which is the recommended configuration; but (especially on 64-bit Windows) you might receive warnings about the Java version being defective. In that case, download and install the Microsoft Visual C++ 2010 Redistributable Package.
http://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe
Comment 2 Michael Whapples 2012-12-19 12:22:41 UTC
Java7 seems to be configured correctly on my system: I have the 32-bit JRE installed, Java7 accessibility is working for Java swing applications and certain control types are identified correctly by NVDA when using OpenOffice (eg. it correctly identifies menus as being a menu). This last point is probably most significant as when accessibility is turned off in OpenOffice then control types are not identified by NVDA.

Some of the issues seem to be occurring some of the time (eg. identifying the document view has focus) where as other issues seem to always occur (eg. the non-speaking of controls when tabbing around the options dialog).

I know that sometimes my computer can show some issues due to timing issues as its a moderately fast computer,, so I will confirm which issues show up on a slower computer.
Comment 3 Michael Whapples 2012-12-19 15:13:32 UTC
The Java7 accessibility issues still show up on the slower computer, particularly the not announcing the control which gets focus when pressing tab to move between controls in a dialog box. The slower computer I have tried it iwth is a 32-bit Windows7 computer, so there is certainly no issue with it not having the correct JVM (IE. 32-bit JVM is the only option).
Comment 4 Michael Whapples 2012-12-28 18:08:45 UTC
I have been doing a bit of testing to ensure I am clear with what is occurring. Here is a test case which will show the bug (I have tested with NVDA and Jaws):
1. Open writer.
2. Type something in the document view.
3. Press alt+f4 to exit.
4. Press tab to move between the buttons in the save changes dialog.

Expected: The screen reader will speak and Braille the button which gets focus.
Actual: When using Java7 no speech or change in Braille occurs, if using Java6 the expected occurs.

It is worth noting I am certain that the Java access bridge is initialised and being used by OpenOffice.org as NVDA and Jaws both are capable of recognising control types (eg. knowing the menu is of type menubar, when in a tree view being able to obtain the index of the selected item, etc).

Also while the above test case is for a specific dialog, this bug affects many dialogs, the start screen where one can choose "Text document", "Spreadsheet", etc, as well as the options dialog to name a couple of examples.

If the statement from NVDA developers is correct and they are not recieving events, the issue of the document view not being announced when opening writer may also be related to this as screen readers possibly will not be recieving a focus event when writer loads and so will not know that the document view is focussed.
Comment 5 Michael Whapples 2013-01-04 10:45:33 UTC
The same issue seems to be occurring with LibreOffice, as the affect is the same I believe these issues may have the same cause, see the following LibreOffice bug https://bugs.freedesktop.org/show_bug.cgi?id=58995
Comment 6 V Stuart Foote 2013-01-04 18:31:40 UTC
(In reply to comment #1)
> When using Java 7 please note that it must be a 32 bits version, and make
> sure you have the Microsoft Visual C++ 2010 Redistributable Package
> 
> See the release notes:
> http://www.openoffice.org/development/releases/3.4.1.html#AOO3.4.
> 1ReleaseNotes-KnownIssues
> 
> Apache OpenOffice 3.4.0 and 3.4.1 support Java 7, which is the recommended
> configuration; but (especially on 64-bit Windows) you might receive warnings
> about the Java version being defective. In that case, download and install
> the Microsoft Visual C++ 2010 Redistributable Package.
> http://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-
> 475AB85EEF6E/vcredist_x86.exe

This is a valid defect in the Java Access Bridge of Java SE JRE 1.7, it can not be corrected by configuration of 32 or 64 JRE.  

It has rendered the UNO Accessibilty API bridged support via Java Accessibility API on Windows unusable with JRE 1.7 as Java and Accessibility events are not being passed by the Java Access Bridge.  JavaFerret-32 tracking shows no Focus events being received although the frame's accessibility tree is fully populated and roles can be querried using JavaMonkey-32 test utilities.

Java SE 6 through JRE 1.6u38 provide Java Accessibility API that is functional with Java Access Bridge v2.0.2.
Comment 7 V Stuart Foote 2013-01-10 20:37:14 UTC
Just verified it remains an issue with the 4.0 Developer builds r1400866

Assume it relates to the work done by Oracle on http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7166956 although not clear what might have changed in building the JREs with the JAB embedded such that the JAB is no longer passing Java Focus events needed by the Java Accessibility API for AT.

But in any case, at this time there is limited support for Assistive Technology for Windows OS users when using Java SE JRE 1.7 > u6 and Java Access Bridge v2.0.3
Comment 8 V Stuart Foote 2013-01-11 02:49:16 UTC
Marking as confirmed. Would be nice to open a dialog with the Oracle Java Accessibility/Access Bridge devs to poke at it from their side. Unfortunately my OTN and Sun Bugzilla account keeps balking at a new bug submission.
Comment 9 Ariel Constenla-Haile 2013-02-04 20:58:26 UTC
FYI QA for the new IAccessible2 implementation is going to start soon. You may find interesting following this thread:
http://markmail.org/thread/blvy5bihp6hsq4ic
Comment 10 V Stuart Foote 2013-07-03 14:14:51 UTC
changes to JDK 1.7 java.awt.DefaultKeyboardFocusManager require additional interface test that accessible components calling isFocusableWindow are also found isDisplayable(), and setting and verifying isFocusable() for java.awt.Component extended classes.

resolved by David O. on the LibreOffice project side with adjustments to:

Dialog.java
Frame.java
Windows.java
ComboBox.java

ref TDF https://bugs.freedesktop.org/show_bug.cgi?id=58995

With IAccessibile2 delayed to at least a 4.1 release, returning support for JRE 1.7 and Java Access Bridge v2.0.3 for the growing number of Windows users pushed onto that JRE by Oracle autoupdate proceedures is becomming more urgent for acceptable AOO Accessibility and its availability of AT tools support on Windows platform.

Nominating as a 4.0.0 release blocker as scope of code changes needed to fix Accessibility for Windows users are well described and easily achieved.
Comment 11 jsc 2013-07-09 06:08:09 UTC
I have received a patch from David Ostrovsky for this and will work on the integration
Comment 12 SVN Robot 2013-07-09 08:14:15 UTC
"jsc" committed SVN revision 1501121 into trunk:
#121510# apply patch to handle new focus check in Java 7
Comment 13 jsc 2013-07-09 08:18:02 UTC
Created attachment 81040 [details]
reworked and combined patch

Patch received via private email from David Ostrovsky and contributed under ALv2
Comment 14 jsc 2013-07-09 08:19:03 UTC
patch reviewed and applied on trunk

Thanks to David Ostrovsky for contributing the patch under ALv2
Comment 15 V Stuart Foote 2013-07-11 07:10:34 UTC
Verified fixed with
Windows build
AOO400m3(Build:9702)  -  Rev. 1501409
Rev.1501409

Thank you, Jürgen and David.