5 Replies Latest reply on Nov 11, 2010 2:03 PM by rascal262

    Java code and JAWS

      I have added a lot of code to my application to support accessibility, and for the most part Jaws will read all my components as the user tabs their way through the app.

      However, there are times when events get triggers and the screen is updated in a location other then where the cursor is.
      Is it possible to add Java code make jaws say specific text?

      For example, the user types in their search criteria and tabs to the search button and presses space to activate.
      The search results table is now populated, but I want to inform the user what just happened.

      I am looking to write Java tell Jaws to say "Search results are now populated." when the table is populated.

      Thanks in advance.
        • 1. Re: Java code and JAWS
          Are there any ideas for a solution to this kind of problem? I have essentially the same need, in which the contents of a custom component are updated in response to user actions and should then be read by JAWS. Even though I fire text and caret property changed events, and JAWS appears to update its content model, it will not speak unless the user (who has no idea that the content has been updated) invokes the reader manually.
          • 2. Re: Java code and JAWS
            At this time JAWS does not support scripting, and its core logic doesn't speak changes that happen in the non-focused object. It may be possible to force this by briefly setting focus to the object that has changed - but this is NOT recommended as it may cause other problems, especially with other assistive technologies that do support scripting of Java applications (e.g. WindowEyes with the WE4Java extension).


            Peter Korn,
            Accessibility Architect & Principal Engineer,
            Sun Microsystems, Inc.
            • 3. Re: Java code and JAWS
              Thanks, Peter. In my case, the component does have focus. I can see either the bridge or JAWS via the bridge (not sure how this works) pulling content from my component when it emits events, but that's apparently not sufficient for JAWS to decide that the new text should be spoken. It's a JPanel extension in an editable text role, if that matters.
              • 4. Re: Java code and JAWS

                I'm guessing the problem may lie in the 'Role' or 'States' that your JPanel extension is exposing, or the sub-interface you have implemented (e.g. AccessibleEditableText). But since this issue revolves around how JAWS is presenting it, your best bet might be to contact Freedom Scientific.


                Peter Korn
                Accessibility Architect & Principal Engineer
                Sun Microsystems Inc.
                • 5. Re: Java code and JAWS
                  In the applet I work on we've implemented a ForceJaws() method that allows Jaws to speak text programatically. It basically just fires an accessible property change event, which prompts Jaws to read the new property, which in our case is the text string we want spoken...

                  mainFrameAccessibleContext.firePropertyChange(AccessibleContext.ACCESSIBLE_DESCRIPTION_PROPERTY, " ", "text to be spoken");