The problem of accessibility within Matlab with Jaws arises due to the presence of Java within Matlab, which does not come pre-enabled with the accessibility fix known as Java Access Bridge (jabswitch). Oracle has, as of Java v1.7.0_06 and above, started to ship the Access Bridge pre-bundled with the installation of Java. At the time of writing, the latest version of the Access Bridge stands at 2.0.3 ? and the purpose of the Access Bridge is to allow Java based applications to provide testing and use of otherwise inaccessible GUI components of programmes.

This method of enabling accessibility with Jaws has been tested using Matlab R2012a 64 bit with Jaws 12 (64 bit) on Windows 7 Professional SP1 (64 bit) on a machine having the following hardware specifications:an Intel Core2-Dual i7 2.7GHz processor with 8GB RAM, having Oracle JDK 1.7.0_07 64 bit and the Java access Bridge stands at 2.0.3 and is enabled system wide. The hardware is a 13 inch Macbook Pro early 2011 which has been upgraded to Mac OS 10.8.1 .

The installation of Oracle JDK 1.7.0_07, even with jabswitch v2.0.3 enabled does not resolve the issues of accessibility of Matlab with Jaws because Matlab uses its own in-built version of Java, which still stands at 1.6.0_17, and the Java has not yet been updated to 1.7.0 even after the release of Matlab R2012b. Therefore, in order to allow the functionality of jabswitch on Matlab, a version of the appropriate Access Bridge manually needs to be installed corresponding to the version of Java on Matlab.

This work describes in detail the procedure for optimising the accessibility of Matlab?s menu bars and command window with Jaws. This method has been tested for backward compatibility with R2011a 32bit using Jaws 11 64 bit on Windows XP Professional 64 bit, where JDK 1.7.0_01 was made to work with a manual system wide installation of jabswitch 2.0.2 and this method will probably also work with earlier versions of Matlab and Jaws together, regardless of computer architecture. This document is intended to fill the gap in the lack of accessibility notes in the installation and testing of Matlab, which at the time of writing, has official instructions only up to a Jaws version 7, released long before the advent of Windows 7. Official documentation at this time does not delve into the version of Matlab used to test this architecture, nor is there any information on the accessibility of 64 bit versions of Matlab products.

Summary of Steps to make Matlab accessible with JawsThis section lists the steps required to allow users and developers alike to test Matlab installation with Jaws the 1. Check the architecture of the Operating System2. Install Jaws3. Install Oracle JDK 1.7.0_06 or higher4. Enable Java Access Bridge on a system wide basis5. Install Matlab6. Set Path of relevant libraries necessary to link to Jaws7. Manually install the appropriate Java Access Bridge to work with Matlab Java8. Set the behaviour of Jaws navigation and reading keys to work with the Matlab Command Window

Please note: Steps 2-5 can be performed in any order of preference. This flexibility not only allows users of Jaws to work with Matlab, but also allows developers of Java and Matlab based applications to test their products for compliance with the necessary accessibility requirements. The following sections describe in details all the above steps, in an attempt to provide a walk through the process.

Check the Architecture of the Operating SystemGenerally this information is available at the point of installation of Windows. It can be obtained not only from the initial product documentation, but also from the command prompt. To obtain the architecture, type the following into the Command Prompt:

>comparch ?

Output: I386: 32 bitI686 / x64: 64 bit

This information is vital as it is the most important factor in the precedence chain to determine the version of Java, Jaws and Matlab that will effectively work together for best accessibility results. The chain of precedence, in order of most important factor first, is as follows:a. Windows Architecture (64 | 32 bit)b. Jaws (64 | 32 bit)c. JDK SE7 U6+ (64 |32 bit)d. Java Access Bridge (64 | 32 bit)e. Matlab architecture (or more precisely, the Matlab JVM architecture) (64 | 32 bit)From the above, it is evident to see that if at any point during the chain, a lower bit version is used, all the proceeding factors cannot be a higher bit architecture. For example, if the Jaws used is a 32 bit version, then JDK, jabswitch and Matlab must all be 32 bit if this solution is to work. At any point along this chain however, it is possible to move to a lower bit version, but all subsequent factors must then be lower bit architectures as well.

Install JawsA demo version, allowing 40 minutes of access at a time (before the machine would require a restart for it to function again) can be downloaded free of charge from the Freedom Scientific Website: http://www.freedomscientific.com where a full version can also be purchased. For best performance, it is always recommended that the latest version of Jaws be used for application interaction and development testing. Please also note that although Jaws 11 is available in a 64 bit version, it will only work best with a 32 bit Matlab architecture. In order to test the full capability of Matlab 64 bit, a 64 bit version of Jaws 12 or higher is required. If Jaws licensing is setup on a network, ensure that the system PATH variable points to the location of the Jaws network.

It is possible to have multiple versions of Jaws simultaneously installed on a single computer. However, only one instance of Jaws can run at any given time.

Install Oracle JDK 1.7.0_06 or higherOracle has officially stopped maintaining JDK SE 6 and encourages users to upgrade their Java to SE7 Update 6 or higher for best performance, improved stability and some important security fixes. This is also the recommendation if the system only has a public Java Runtime Environment (jre7). Java SE 7 is interchangeably referred to as 1.7.0 and in order to install and run Matlab, JDK is not a pre-requisite, although having a JDK does allow much better functionality as well as appropriate tools for Java development. Instructions for installing the JRE are listed on the Oracle Java Page http://java.sun.com along with those for installing the JDK. The page also provides links to the latest Java downloads.

Although the installation procedure is similar, this work concentrates mainly on the use of JDK. After downloading the installer package, just run the setup and follow the on-screen instructions. When the installer finishes, set the PATH to Java for convenience by following these steps:1. Either enter within the Search field within the Start Menu the words ?environment variables? or locate it through Control Panel, depending on the version of Windows2. Locate the ?Edit System Environment Variables? button3. Add the following to the end of the PATH variable (if the existing line does not have a semicolon (;) add one and then type the PATH to the Java Installation). For most users, this normally looks like:

C:\Program Files\Java\jdk1.7.0_07\bin;

If the Java is installed in a different location, locate the bin folder within the Java JDK directory. System privileges must allow for this step to be carried out4. Restart the system5. To test the setup of Java, enter the following command in the Command Prompt:

>java ?versionAlthough multiple instances of Java are allowed on a machine, it is always best to install the version corresponding to the Computer?s architecture6. If any custom scripts have been installed on Jaws, just recompile the default.jss file within Jaws (do not amend anything) and save the result7. Restart Jaws (if installed and running)

Installation of Java prior to Matlab installation improves the setup and initialisation of Matlab and also provides better accessibility to the Matlab online documentation.

Enabling the Java Access Bridge on a System Wide basisJava SE 7U6 and above come bundled with the Java Access Bridge, allowing users to enable it for all GUI applications without having to perform a complicated set of copy-pasting of files to locations buried deep within the Java hierarchy. To enable Java Access Bridge:1. press WIN+u to launch the Ease of Access Centre2. Navigate to ?Use the Computer Without A Display?3. Check the box ?Enable Java Access Bridge?4. Click OK5. Restart for good measureAlternatively, to enable Java Access Bridge from the Command Line, open the Command Prompt, navigate to the folder corresponding to the Java PATH variable and type the following:

>jabswitch ?enable

The output should inform that the jabswitch has been enabled. To enable Java Access Bridge for all users, repeat the above steps for each user.

If multiple instances of Java are installed on a system, the above steps for enabling the jabswitch via the Command prompt must be repeated for each instance of the JDK. If using Jaws, Freedom Scientific discourages using multiple instances of the Java Access Bridge simultaneously. For optimal performance and speed, it is recommended that If using a 64 bit instance of the JDK, users should also install the jre7 32 bit version to allow better access to the Matlab online documentation and help on a range of browsers.

Installing MatlabInstall the relevant version of Matlab either from the installation media or from the Mathworks website http://www.mathworks.com and restart the system. Launch the application after launching Jaws. Once the Matlab Command Window has launched, try navigating to the menu bar by pressing ALT+F. Navigate left and right to explore the menus, and notice that Jaws does not announce anything at this point. This is because of the presence of Matlab?s own JRE, which is a separate entity from the system Java and differs in version. To make the Matlab Java work with the accessibility features, the relevant Java Access Bridge needs to be installed.

On the Matlab Command Window, type the following commands and record the outputs for later use:

>matlabroot

>version ?java

These commands list the installation of the Matlab structure, and also the version of JRE used by the installed Matlab on the system.

Typical values of the above commands may look something as follows (exact dvalues depend on the system installation and version of Matlab):

These will be required in the following sections. Notice the 64 bit indication of Java from the above output, indicating that the installed Matlab, and its JRE are indeed 64 bit, and will therefore require a 64 bit Java Access Bridge and will work best with a Jaws that is also 64 bit, as explained in the precedence chain above. For 32 bit versions of Matlab, a 32 bit Java Access Bridge needs to be installed as expected.

It is important to note that:1. Installing a 64 bit version of the Java Access Bridge on a 32 bit Matlab Java will not work with Jaws, and might hinder the program?s performance. 2. Installing a 32 bit Java Access bridge on a 64 bit version of Matlab will only allow partially improved accessibility, and there is no guarantee of this.At this point, it is important to be reminded that enabling the Java Access Bridge v2.0.3 with JDK SE 7 system wide would certainly improve Matlab?s download and installation performance, and also allow Jaws to add Matlab related scripts in the default.jss file. In addition, it will also improve the accessibility of other Java based programs, improve the performance of Jaws and also provide means to test and future proof any Java based applications developed using Matlab for use with other third party utilities.

Set Path of relevant libraries necessary to link to JawsIf Matlab and Jaws are installed simultaneously, there are certain libraries that allow Matlab to link to the built in functionality of Jaws. To set the launch of these libraries, simply include the following line to the end of the PATH system environment variable (Do not forget to include the ; at the end of this ? it is imperative in this case):

For a 64 bit Matlab:Matlabroot\bin\win64;

For a 32 bit Matlab:Matlabroot\bin\sys32;

The matlabroot is the value obtained above. Note that the co-existence of Matlab and Jaws does not impair performance, and disabling or quitting Jaws will still allow the user to use Matlab effectively following a relaunch of Matlab. Additionally, in order to develop accessible applications using Matlab and it?s compiler, set the following PATH variable:For a 64 bit system:Matlabroot\runtime\win64\

For a 32 bit system:Matlabroot\runtime\sys32\

For reasons not fully understood, enabling both the above as PATH variables, the overall improvement of Matlab?s start up window is improved. However, there is still no Java Access Bridge on the Matlab JRE. The following section describes this installation procedure, which for earlier versions of the Java SE can also be used for the system wide installation of the Java Access Bridge.

Manually install the appropriate Java Access Bridge to work with Matlab JavaDownload the relevant version of the Java Access Bridge from the Oracle Java Archives Download Page: http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-java-client-419417.html and follow the instructions relevant for the specific version of the Matlab JRE. The reason for the choice of the Java Access Bridge downloads is the different versions of the JVM releases, and the corresponding Java Access Bridge releases at the time of the Java SE availability. Both the Java SE and the corresponding Access Bridge have been subsequently updated for stability and improvement of the Oracle suite of products, even though Matlab may not pace itself with these latest releases and stability updates. The table below lists the most recent version of the Java Access Bridge corresponding to the version of the JRE as used by Mathworks products. Note that even though a slightly lower version of the Java Access Bridge may be used, performance, speed and stability are best preserved when the latest recommended release of the Java Access Bridge are installed and enabled. Matlab JRE version Java Access Bridge latest stable version1.6.0_<update> 2.0.21.5.0_<update> 2.0.11.4.0_<update> 1.21.3.0_<update> 1.0.4 Table 1: Versions of the jabswitch corresponding to the Matlab JRE. Note that the JRE is dependent on the version of Matlab on the system

As explained above, the command ?version ?java? can yield information about the JRE used by Matlab for a given installation.

It is also important to note that some older versions of Jaws may not correctly function for the versions of Matlab and jabswitch beyond their scope. Consult the Freedom Scientific pages if in doubt. It must also be noted that the system wide installation of the Java Access Bridge links to any application dependent on earlier versions of the jabswitch, and therefore there is no need to amend the special properties files under the name ?accessibility.properties? as described in the official Mathworks documentation. The system wide implementation of version 2.0.3 already takes care of this step and the file that is pre-bundled with this name is sufficient to rely on the dependence of backward compatibility.

To manually install the version relevant to the Matlab JRE, follow these steps:1. Download the relevant version of the Java Access Bridge from the Oracle website2. Unpack the installation, and copy the listed files into the locations described in Table 2. For 32 bit versions of the JRE, download and install the 32 bit version of the jabswitch and for 64 bit versions of the JRE, install the 64 bit versions of the Java Access Bridge. If a 64 bit version of the jabswitch is not available, download the latest prior release.3. For a 64 bit installation, follow these steps as outlined in the Bug Report#739518

4. Following the above steps, restart Matlab.5. Press ALT+F to hear the output of Jaws. Explore the menus with the arrow keys. If the menu is audible, the installation has been successful and Matlab is now ready to be used with Jaws. For 32 bit versions, substitute win64 in the above with sys32 /win32 instead, and copy the 32 bit file versions instead

Set the behaviour of Jaws navigation and reading keys to work with the Matlab Command WindowThe final step required to make Matlab accessible with Jaws is to decouple Matlab keyboard commands which cause conflict with Jaws?s reading keystrokes. Furthermore, for users of Jaws, it is important to allow keyboard access to easily navigate around the command window to obtain the output of the entered command, i.e. to allow Jaws to read the output on the command window. The up and down arrow keys in this work are being designated for navigation across the command window. Further, the CTRL+up and CTRL+down combinations, used for the previous and next command in the history buffer are in direct conflict with the Jaws read line instructions, and in this work, the above commands for Matlab are being altered to CTRL+SHIFT+up and CTRL+SHIFT+down combinations. These can be chosen as per the user?s preference, and can be restored to defaults at any time.

To enable navigation of the Matlab command window using the arrow keys, and to allow the new combinations to recall commands from the history buffer, copy the following text into a text editor and save it as CustomWindowsSet.xml

Then in this location, locate the file ?matlab.prf? to edit the system preferences which will now take advantage of the properties defined in CustomWindowsSet.xml ? the contents of the file depends on the user?s preferences and may vary from person to person. Open matlab.prf in a text editor and add the following two lines at the end of the file:

Save this file in the same location and do not amend the name. Relaunch Matlab. Now type in a few commands, examine the output. If Jaws allows arrow key navigation and the alternative recall of commands in the history window, the exercise has succeeded.

Please note that the preferences can easily be removed and the system can be restored to defaults at any time. Simply label the above mentioned folder with a different name and relaunch Matlab. The initialisation will appear slightly longer, but during this exercise, Matlab will recreate the preferences to the default set. The old preferences folder can now be deleted or archived.

Remarks1. Please note that jabswitch will not function if the JRE version is below 1.3.02. The above settings may not work with NVDA or other screen readers. Consult the vendor for instructions3. This method may not assist with content which is by nature visually inaccessible4. Do not try to re-implement the version of the JVM through the MATLAB_JAVA system variable. Although this method may update the version of the JVM for use with Matlab, it may affect the performance of jabswitch through conflicts, even if version 2.0.3 is installed system wide. It also impacts some of the in-built Matlab tools5. Mac and Linux users please note that the built in version of Java on these operating systems do not make use of the Java Access Bridge. In fact, to test the accessibility of Matlab on a Mac, test it with VoiceOver and Zoom. On Linux, test it with orca, speak up or EmacSpeak6. There is no implementation of the jabswitch within the OpenJDK, not even in the latest version, so do not use it to improve or test the accessibility of Matlab?s JRE7. The list of keyboard conflicts is not exhaustive and may need to be revisited from time to time with updates to Matlab and Jaws

ConclusionThis has been an attempt to fill in the gap left due to updates of the official Mathworks documentation not maintaining pace with the advent of Windows 7, higher versions of the Java SE, improvements in Jaws as well as the many versions of Matlab that have been released since the last official testing for accessibility has been carried out. It has attempted to provide a step-by-step walk through for allowing Matlab 32 and 64 bit versions to be set up and used by Jaws. It also presents the user to use Matlab without the use of the ?diary? or ?nojava? flags, thereby allowing equal access to all possible functionality within an academic or industrial testing and development scenarios.

This solution remains the best possible work around for Matlab with respect to accessibility until Mathworks sufficiently updates its Java to 1.7.0_06 or higher. Note that although all possible effort has been taken here to maintain accuracy, the author shall in no way be deemed liable or responsible for any loss or damage, including financialor physical loss from the use of advise presented here in.

AcknowledgementsSpecial thanks are due to the Mathworks Technical Support Team for assistance in implementation of this solution and without their effort, this work may have not been possible.