Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8096572

[Accessibility] Support JAWS

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8u40
    • 8u40
    • javafx
    • None
    • Windows 8, JAWS 15

      Currently JavaFX accessibility does not work with JAWS.

      The reason is that JavaFX implements UI Automation, and *weirdly* JAWS requests MSAA.
      JavaFX is not set to allow the UIA-to-MSAA Bridge.
      This is how JavaFX handles WM_GETOBJECT:
      LRESULT lr = NULL;
      /* WM_GETOBJECT is sent to request different object types. Make sure the
       * request is for 'UI Automation provider' before calling getAccessible() */
      if (static_cast<long>(lParam) == static_cast<long>(UiaRootObjectId)) {
          JNIEnv* env = GetEnv();
          jlong pProvider = env->CallLongMethod(GetView(), javaIDs.View.getAccessible);
          CheckAndClearException(env);
          if (pProvider) {
              lr = UiaReturnRawElementProvider(hwnd, wParam, lParam, reinterpret_cast<IRawElementProviderSimple*>(pProvider));
          }
      }
      return lr;

      This is consistent with MSDN doc:
      http://msdn.microsoft.com/en-us/library/windows/desktop/ff625912(v=vs.85).aspx

      To allows the bridge JavaFX could stop testing lParam==UiaRootObjectId.
      That would get JAWS going, but the bridge does not respect threading (ProviderOptions_UseComThreading), which means a11y will run on different thread(s).
      Currently that would crash everywhere as GetEnv() used in the up calls returns NULL if the call is not made in the java thread.

      The sad part is that Freedom Scientific claims that JAWS 11 supports UI Automation.
      See release notes:
      http://www.freedomscientific.com/news/pressroom/2009/JAWS-11-released.asp
      (I'm running JAWS 15, 64bits).

      Not sure if they claim support thru the UIA-to-MSAA Bridge or they really support it.

      Debugging WM_GETOBJECT JAWS only ever call with OBJID_CLIENT (and OBJID_QUERYCLASSNAMEIDX) but never for UiaRootObjectId as expected by a real UI Automation client. See http://msdn.microsoft.com/en-us/library/windows/desktop/dd373892(v=vs.85).aspx

            fheidric Felipe Heidrich (Inactive)
            fheidric Felipe Heidrich (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: