NPAPI:NativeAccessibility: Difference between revisions

Line 42: Line 42:
To allow plugins to provide their own accessibility support in both in process (IP) and out of process (OOP) scenarios, we leverage the AT-SPI registry to coalesce accessibiles from the browser and the plugin. Two corresponding objects are involved in this process in ATK, namely <tt>AtkPlug</tt> and <tt>AtkSocket</tt>.  Together, they are used to connect accessibility hierarchies in a manner that is transparent to ATs.  These APIs work both for accessibles in the same process, as well as accessibles in different processes.
To allow plugins to provide their own accessibility support in both in process (IP) and out of process (OOP) scenarios, we leverage the AT-SPI registry to coalesce accessibiles from the browser and the plugin. Two corresponding objects are involved in this process in ATK, namely <tt>AtkPlug</tt> and <tt>AtkSocket</tt>.  Together, they are used to connect accessibility hierarchies in a manner that is transparent to ATs.  These APIs work both for accessibles in the same process, as well as accessibles in different processes.


In this example, the browser would create an <tt>AtkSocket</tt> object, and place it in the plugin's spot on the accessibility hierarchy.  The plugin's host would then call <tt>NPP_GetValue</tt> with <tt>NPPNativeAccessibleAtkPlugId</tt> as the <tt>variable</tt> parameter.
In this example, the browser would create an <tt>AtkSocket</tt> object, and place it in the plugin's spot on the accessibility hierarchy.  The plugin's host would then call <tt>NPP_GetValue</tt> with <tt>NPPVpluginNativeAccessibleAtkPlugId</tt> (with value 21) as the <tt>variable</tt> parameter.


Compatible plugins would return the value of <tt>atk_plug_get_id()</tt> (a <tt>char*</tt>), or <tt>NULL</tt> indicating that they do not provide remote accessibility support.
Compatible plugins would return the value of <tt>atk_plug_get_id()</tt> (a <tt>char*</tt>), or <tt>NULL</tt> indicating that they do not provide remote accessibility support.
Line 52: Line 52:
A detailed description of the mechanics of this API in the Linux accessibility stack is available on the [http://mail.gnome.org/archives/gnome-accessibility-devel/2009-September/msg00012.html gnome-accessibility-devel] mailing list.   
A detailed description of the mechanics of this API in the Linux accessibility stack is available on the [http://mail.gnome.org/archives/gnome-accessibility-devel/2009-September/msg00012.html gnome-accessibility-devel] mailing list.   


''NOTE'': The proposed addition to ATK is not yet available, and slated for completion in Q1 2010.
The new AtkPlug and AtkSocket API is now available in ATK 1.30 and AT-SPI2 0.1.3.  It will be shipped as the default accessibility toolkit by distributions which ship GNOME 3.0.
26

edits