Accessibility/Plugins: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(New page: <small><< Back to Accessibility Home Page</small> =Introduction= This page is designed to provide draft specification of Mozilla plugins accessibility. In the meantime...)
 
Line 13: Line 13:


=Implementation=
=Implementation=
== nsIAccessibleTreeNode ==
This interface is intended to assign accessible parent, children and siblings.
<code>
interface nsIAccessibleTreeNode : public nsISupports
{
  setParent(nsIAccessibleTreeNode *aNode);
  setFirstChild(nsIAccessibleTreeNode *aNode);
  setNextSibling(nsIAccessibleTreeNode *aNode);
};
</code>


== Embedding plugin hierarchy to Mozilla hierarchy ==
== Embedding plugin hierarchy to Mozilla hierarchy ==
Line 19: Line 32:


<code>
<code>
NPError NS?_GetPluginAccessible(NPP aInstance, nsIAccessible **aAccessible);
NPError NS?_GetPluginAccessible(NPP aInstance, nsIAccessibleTreeNode **aNode);
</code>
</code>
== Create crossplatfrom code ==

Revision as of 08:45, 27 February 2009

<< Back to Accessibility Home Page

Introduction

This page is designed to provide draft specification of Mozilla plugins accessibility. In the meantime plugins authors are forced to care about accessibility itself. They need to implement AT API interfaces for UI interfaces used in their plugins for each platform plugins are intended to work. That means if plugin is assumed to be supported on all platform Mozilla works on then plugin authors must implement MSAA/IA2 on Windows, AT/AT-SPI on Linux, Universal Access on OS X. So it's getting hard to share common accessibility code between platforms, need to learn different APIs for each platform. This article subject is getting specification to allow plugin authors to embed their plugins into accessibility hierarchy and write common accessibility code for each platform the plugin is indented to work on.

Benefits are

  • plugins are embedded into Mozilla accessibility hierarchy
  • plugins have crossplatform accessibility code

Disadvantages are

  • learning specific Mozilla accessibility API

Implementation

nsIAccessibleTreeNode

This interface is intended to assign accessible parent, children and siblings.

interface nsIAccessibleTreeNode : public nsISupports {

 setParent(nsIAccessibleTreeNode *aNode);
 setFirstChild(nsIAccessibleTreeNode *aNode);
 setNextSibling(nsIAccessibleTreeNode *aNode);

};

Embedding plugin hierarchy to Mozilla hierarchy

Extend plugin API to provide accessible object implementing nsIAccessible interfaces created for element embedding the plugin.

NPError NS?_GetPluginAccessible(NPP aInstance, nsIAccessibleTreeNode **aNode);

Create crossplatfrom code