NPAPI:NativeAccessibility: Difference between revisions

Jump to navigation Jump to search
(Remove IP section, replace with OPP solution compatible with IP scenario)
Line 44: Line 44:
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>NPN_GetValue</tt> with <tt>NPNVNativeAccessibleAtkPlugId</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>NPPNativeAccessibleAtkPlugId</tt> 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.
26

edits

Navigation menu