nsIAccessible

  • Revision slug: nsIAccessible
  • Revision title: nsIAccessible
  • Revision id: 134394
  • Created:
  • Creator: Surkov.alexander
  • Is current revision? No
  • Comment 39 words removed

Revision Content

{{ BackToPage("Accessibility:AT-APIs#Supported_Interfaces", "AT APIs Support") }}

Summary

The nsIAccessible interface is a cross-platform interface that supports platform-specific accessibility APIs like MSAA and ATK. Contains the sum of what's needed to support IAccessible as well as ATK's generic accessibility objects.

Can also be used by in-process accessibility clients to get information about objects in the accessible tree. The accessible tree is a subset of nodes in the DOM tree -- such as documents, focusable elements and text. Mozilla creates the implementations of nsIAccessible on demand.

See: http://www.mozilla.org/projects/ui/accessibility for more information

Inherits from: nsISupports

 [scriptable, uuid=(c7520419-87ec-42bc-98cc-04c0bf173530)]
 interface nsIAccessible : nsISupports { ... };

Methods

   

Method overview

nsIDOMDOMStringList getKeyBindings(in PRUint8 aActionIndex);
void getFinalState(out unsigned long aState, out unsigned long aExtraState);
void groupPosition(out long aGroupLevel, out long aSimilarItemsInGroup, out long aPositionInGroup);
nsIAccessible getChildAtPoint(in long x, in long y);
nsIAccessible getChildAt(in long aChildIndex);
nsIAccessible getAccessibleToRight();
nsIAccessible getAccessibleToLeft();
nsIAccessible getAccessibleAbove();
nsIAccessible getAccessibleBelow();
nsIAccessible getAccessibleRelated(in unsigned long aRelationType);
nsIAccessibleRelation getRelation(in unsigned long index);
nsIArray getRelations();
void getBounds(out long x, out long y, out long width, out long height);
void setSelected(in boolean isSelected);
void extendSelection();
void takeSelection();
void takeFocus();
AString getActionName(in PRUint8 index);
AString getActionDescription(in PRUint8 aIndex);
void doAction(in PRUint8 index);

Attributes

Attribute Type Description
parent nsIAccessible Parent node in accessible tree.
nextSibling nsIAccessible Next sibling in accessible tree.
previousSibling nsIAccessible Previous sibling in accessible tree.
firstChild nsIAccessible First child in accessible tree.
lastChild nsIAccessible Last child in accessible tree.
children nsIArray Array of all this element's children.
childCount long Number of accessible children.
indexInParent long The 0-based index of this accessible in its parent's list of children, or -1 if this accessible does not have a parent.
name AString Accessible name -- the main text equivalent for this node.
value AString Accessible value -- a number or a secondary text equivalent for this node. Widgets that use role attribute can force a value using the valuenow attribute.
description AString Accessible description -- long text associated with this node.
keyboardShortcut AString Provides localized string of accesskey name, such as Alt+D. The modifier may be affected by user and platform preferences. Usually alt+letter, or just the letter alone for menu items..
defaultKeyBinding AString Provides localized string of global keyboard accelerator for default action, such as Ctrl+O for Open file.
role unsigned long Natural enumerated accessible role for the associated element. The values depend on platform because of variations. See the ROLE_* constants defined in {{ Interface("nsIAccessibleRole") }}.

This does not take into account role attribute as the finalRole does.

finalRole unsigned long Enumerated accessible role. The values depend on platform because of variations. See the ROLE_* constants defined in {{ Interface("nsIAccessibleRole") }}. Widgets can use role attribute to force the final role
help AString Help text associated with node.
focusedChild nsIAccessible Focused accessible child of node.
attributes nsIPersistentProperties Attributes of accessible.
relationsCount unsigned long Returns the number of accessible relations for this object.
numActions PRUint8 The number of accessible actions associated with this accessible.

Methods

getKeyBindings()

This method provides array of localized string of global keyboard accelerator for the given action index supported by accessible.

 nsIDOMDOMStringList getKeyBindings(
   in PRUint8 aActionIndex
 );
Parameters
aActionIndex
Index of the given action.
Return value

Returns array of localized string of global keyboard accelerator.

getFinalState()

This method retrieves a final state. Accessible states -- bit fields which describe boolean properties of node. Many states are only valid given a certain role attribute that supports them.

 void getFinalState(
   out unsigned long aState, 
   out unsigned long aExtraState
 );
Parameters
aState
The first bit field (See: {{ Interface("nsIAccessibleStates") }} STATE_* constants).
aExtraState
The second bit field (See: {{ Interface("nsIAccessibleStates") }} EXT_STATE_* constants).

groupPosition()

This method returns grouping information. Used for tree items, list items, tab panel labels, radio buttons, etc. Also used for collectons of non-text objects.

 void groupPosition(
   out long aGroupLevel, 
   out long aSimilarItemsInGroup,
   out long aPositionInGroup
 );
Parameters
aGroupLevel
1-based, similar to ARIA level property.
aSimilarItemsInGroup
1-based, similar to ARIA setsize property, inclusive of the current item.
aPositionInGroup
1-based, similar to ARIA posinset property.

getChildAtPoint()

This method returns an accessible child which contains the coordinate at (x, y) in screen pixels.

If the point is in the current accessible but not in a child, the current accessible will be returned.

If the point is in neither the current accessible or a child, then NULL will be returned.

 nsIAccessible getChildAtPoint(
   in long x, 
   in long y
 );
Parameters
x
Accessible's X-coordinate.
y
Accessible's Y-coordinate.
Return value

Returns an accessible child at given (x, y) coordinate.

getChildAt()

This method returns Nth accessible child using zero-based index or last child if index than less than zero.

 nsIAccessible getChildAt(
   in long aChildIndex
 );
Parameters
aChildIndex
The index of the Nth child.
Return value

Returns Nth accessible child using zero-based index or last child if index is less than zero.

getAccessibleToRight()

This method returns an accessible node geometrically to the right of this one.

 nsIAccessible getAccessibleToRight();
Parameters

None.

Return value

Returns an accessible node geometrically to the right of this one.

getAccessibleToLeft()

This method returns an accessible node geometrically to the left of this one.

 nsIAccessible getAccessibleToLeft();
Parameters

None.

Return value

Returns an accessible node geometrically to the left of this one.

getAccessibleAbove()

This method returns an accessible node geometrically above this one.

 nsIAccessible getAccessibleAbove();
Parameters

None.

Return value

Returns an accessible node geometrically above this one.

getAccessibleBelow()

This method returns an accessible node geometrically below this one.

 nsIAccessible getAccessibleBelow();
Parameters

None.

Return value

Returns an accessible node geometrically below this one.

getAccessibleRelated()

This method returns an accessible related to this one by the given relation type (See: constants defined in {{ Interface("nsIAccessibleRelation") }}).

 nsIAccessible getAccessibleRelated(
   in unsigned long aRelationType
 );
Parameters
aRelationType
The relation type between the accessible.
Return value

Returns an accessible which is related to the one provided by the given relation type.

getRelation()

This method returns one accessible relation for this object.

 nsIAccessibleRelation getRelation(
   in unsigned long index
 );
Parameters
index
The index for which relation is to be retrieved.
Return value

Returns one accessible relation for this object.

getRelations()

This method returns multiple accessible relations for this object.

 nsIArray getRelations();
Parameters

None.

Return value

Returns multiple accessible relations for this object.

getBounds()

This method returns accessible's (x and y) coordinates relative to the screen and accessible's width and height.

 void getBounds(
   out long x, 
   out long y, 
   out long width, 
   out long height
 );
Parameters
x
Accessible's X-coordinate.
y
Accessible's Y-coordinate.
width
Accessible's width.
height
Accessible's height.
Return value

Returns accessible's (x and y) coordinates relative to the screen and accessible's width and height.

setSelected()

This method adds or remove this accessible to the current selection.

 void setSelected(
   in boolean isSelected
 );
Parameters
isSelected
The current selection.

extendSelection()

This method extends the current selection from its current accessible anchor node to this accessible.

 void extendSelection();
Parameters

None.

takeSelection()

This method selects this accessible node only.

 void takeSelection();
Parameters

None.

takeFocus()

This method focuses this accessible node.

The state STATE_FOCUSABLE indicates whether this node is normally focusable. It is the callers responsibility to determine whether this node is focusable.accTakeFocus on a node that is not normally focusable (such as a table), will still set focus on that node, although normally that will not be visually indicated in most style sheets.

 void takeFocus();
Parameters

None.

getActionName()

This method retrieves the name of the accessible action at the given zero-based index.

 AString getActionName(
   in PRUint8 index
 );
Parameters
index
The zero-based index.
Return value

Returns the name of the accessible action.

getActionDescription()

This method retrieves the description of the accessible action at the given zero-based index.

 AString getActionDescription(
   in PRUint8 aIndex
 );
Parameters
aIndex
The zero-based index.
Return value

Returns the description of the accessible action.

doAction()

This method performs the accessible action at the given zero-based index. Action number 0 is the default action.

 void doAction(
   in PRUint8 index
 ); 
Parameters
index
The zero-based index.

See also

 

Revision Source

<p>{{ BackToPage("Accessibility:AT-APIs#Supported_Interfaces", "AT APIs Support") }}</p>
<h3 name="Summary">Summary</h3>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.7em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">The <code style="color: rgb(37, 34, 29); font-weight: inherit; ">nsIAccessible</code> interface is a cross-platform interface that supports platform-specific accessibility APIs like MSAA and ATK. Contains the sum of what's needed to support <code style="color: rgb(37, 34, 29); font-weight: inherit; ">IAccessible</code> as well as ATK's generic accessibility objects.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.7em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Can also be used by in-process accessibility clients to get information about objects in the accessible tree. The accessible tree is a subset of nodes in the DOM tree -- such as documents, focusable elements and text. Mozilla creates the implementations of <code style="color: rgb(37, 34, 29); font-weight: inherit; ">nsIAccessible</code> on demand.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.7em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">See: <code style="color: rgb(37, 34, 29); font-weight: inherit; "><a class=" external" href="http://www.mozilla.org/projects/ui/accessibility" rel="freelink">http://www.mozilla.org/projects/ui/accessibility</a></code> for more information</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.7em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Inherits from: <a href="/en/nsISupports" style="text-decoration: none; color: rgb(4, 137, 183) !important; cursor: default; " title="en/nsISupports">nsISupports</a></p>
<pre class="eval" style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.7em; margin-left: 0px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(223, 236, 241); border-right-color: rgb(223, 236, 241); border-bottom-color: rgb(223, 236, 241); border-left-color: rgb(223, 236, 241); padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; overflow-x: auto; overflow-y: auto; font: normal normal normal 12px/normal 'Courier New', 'Andale Mono', monospace; color: rgb(37, 34, 29); "> [scriptable, uuid=(c7520419-87ec-42bc-98cc-04c0bf173530)]
 interface nsIAccessible : <a href="/nsISupports" title="nsISupports">nsISupports</a> { ... };
</pre>
<h3 name="Methods">Methods</h3>
<p>   </p>
<h2 name="Method_overview">Method overview</h2>
<table class="standard-table"> <tbody> <tr> <td><code><a href="/en/NsIDOMDOMStringList" title="en/NsIDOMDOMStringList">nsIDOMDOMStringList</a> <a href="#getKeyBindings.28.29">getKeyBindings</a>(in PRUint8 aActionIndex);</code></td> </tr> <tr> <td><code>void <a href="#getFinalState.28.29">getFinalState</a>(out unsigned long aState, out unsigned long aExtraState);</code></td> </tr> <tr> <td><code>void <a href="#groupPosition.28.29">groupPosition</a>(out long aGroupLevel, out long aSimilarItemsInGroup, out long aPositionInGroup);</code></td> </tr> <tr> <td><code>nsIAccessible <a href="#getChildAtPoint.28.29">getChildAtPoint</a>(in long x, in long y);</code></td> </tr> <tr> <td><code>nsIAccessible <a href="#getChildAt.28.29">getChildAt</a>(in long aChildIndex);</code></td> </tr> <tr> <td><code>nsIAccessible <a href="#getAccessibleToRight.28.29">getAccessibleToRight</a>();</code></td> </tr> <tr> <td><code>nsIAccessible <a href="#getAccessibleToLeft.28.29">getAccessibleToLeft</a>();</code></td> </tr> <tr> <td><code>nsIAccessible <a href="#getAccessibleAbove.28.29">getAccessibleAbove</a>();</code></td> </tr> <tr> <td><code>nsIAccessible <a href="#getAccessibleBelow.28.29">getAccessibleBelow</a>();</code></td> </tr> <tr> <td><code>nsIAccessible <a href="#getAccessibleRelated.28.29">getAccessibleRelated</a>(in unsigned long aRelationType);</code></td> </tr> <tr> <td><code><a href="/en/NsIAccessibleRelation" title="en/NsIAccessibleRelation">nsIAccessibleRelation</a> <a href="#getRelation.28.29">getRelation</a>(in unsigned long index);</code></td> </tr> <tr> <td><code><a href="/en/nsIArray" title="en/nsIArray">nsIArray</a> <a href="#getRelations.28.29">getRelations</a>();</code></td> </tr> <tr> <td><code>void <a href="#getBounds.28.29">getBounds</a>(out long x, out long y, out long width, out long height);</code></td> </tr> <tr> <td><code>void <a href="#setSelected.28.29">setSelected</a>(in boolean isSelected);</code></td> </tr> <tr> <td><code>void <a href="#extendSelection.28.29">extendSelection</a>();</code></td> </tr> <tr> <td><code>void <a href="#takeSelection.28.29">takeSelection</a>();</code></td> </tr> <tr> <td><code>void <a href="#takeFocus.28.29">takeFocus</a>();</code></td> </tr> <tr> <td><code>AString <a href="#getActionName.28.29">getActionName</a>(in PRUint8 index);</code></td> </tr> <tr> <td><code>AString <a href="#getActionDescription.28.29">getActionDescription</a>(in PRUint8 aIndex);</code></td> </tr> <tr> <td><code>void <a href="#doAction.28.29">doAction</a>(in PRUint8 index);</code></td> </tr> </tbody>
</table>
<h2 name="Attributes">Attributes</h2>
<table class="standard-table"> <tbody> <tr> <td class="header">Attribute</td> <td class="header">Type</td> <td class="header">Description</td> </tr> <tr> <td><code id="parent">parent</code></td> <td><code>nsIAccessible</code></td> <td>Parent node in accessible tree.</td> </tr> <tr> <td><code id="nextSibling">nextSibling</code></td> <td><code>nsIAccessible</code></td> <td>Next sibling in accessible tree.</td> </tr> <tr> <td><code id="previousSibling">previousSibling</code></td> <td><code>nsIAccessible</code></td> <td>Previous sibling in accessible tree.</td> </tr> <tr> <td><code id="firstChild">firstChild</code></td> <td><code>nsIAccessible</code></td> <td>First child in accessible tree.</td> </tr> <tr> <td><code id="lastChild">lastChild</code></td> <td><code>nsIAccessible</code></td> <td>Last child in accessible tree.</td> </tr> <tr> <td><code id="children">children</code></td> <td><code><a href="/en/nsIArray" title="en/nsIArray">nsIArray</a></code></td> <td>Array of all this element's children.</td> </tr> <tr> <td><code id="childCount">childCount</code></td> <td><code>long</code></td> <td>Number of accessible children.</td> </tr> <tr> <td><code id="indexInParent">indexInParent</code></td> <td><code>long</code></td> <td>The 0-based index of this accessible in its parent's list of children, or <code>-1</code> if this accessible does not have a parent.</td> </tr> <tr> <td><code id="name">name</code></td> <td><code>AString</code></td> <td>Accessible name -- the main text equivalent for this node.</td> </tr> <tr> <td><code id="value">value</code></td> <td><code>AString</code></td> <td>Accessible value -- a number or a secondary text equivalent for this node. Widgets that use role attribute can force a value using the valuenow attribute.</td> </tr> <tr> <td><code id="description">description</code></td> <td><code>AString</code></td> <td>Accessible description -- long text associated with this node.</td> </tr> <tr> <td><code id="keyboardShortcut">keyboardShortcut</code></td> <td><code>AString</code></td> <td>Provides localized string of accesskey name, such as Alt+D. The modifier may be affected by user and platform preferences. Usually <code>alt+letter</code>, or just the letter alone for menu items..</td> </tr> <tr> <td><code id="defaultKeyBinding">defaultKeyBinding</code></td> <td><code>AString</code></td> <td>Provides localized string of global keyboard accelerator for default action, such as <code>Ctrl+O</code> for Open file.</td> </tr> <tr> <td><code id="role">role</code></td> <td><code>unsigned long</code></td> <td>Natural enumerated accessible role for the associated element. The values depend on platform because of variations. See the <code>ROLE_*</code> constants defined in {{ Interface("nsIAccessibleRole") }}. <p>This does not take into account role attribute as the <code>finalRole</code> does.</p> </td> </tr> <tr> <td><code id="finalRole">finalRole</code></td> <td><code>unsigned long</code></td> <td>Enumerated accessible role. The values depend on platform because of variations. See the <code>ROLE_*</code> constants defined in {{ Interface("nsIAccessibleRole") }}. Widgets can use role attribute to force the final role</td> </tr> <tr> <td><code id="help">help</code></td> <td><code>AString</code></td> <td>Help text associated with node.</td> </tr> <tr> <td><code id="focusedChild">focusedChild</code></td> <td><code>nsIAccessible</code></td> <td>Focused accessible child of node.</td> </tr> <tr> <td><code id="attributes">attributes</code></td> <td><code><a href="/en/NsIPersistentProperties" title="en/NsIPersistentProperties">nsIPersistentProperties</a></code></td> <td>Attributes of accessible.</td> </tr> <tr> <td><code id="relationsCount">relationsCount</code></td> <td><code>unsigned long</code></td> <td>Returns the number of accessible relations for this object.</td> </tr> <tr> <td><code id="numActions">numActions</code></td> <td><code>PRUint8</code></td> <td>The number of accessible actions associated with this accessible.</td> </tr> </tbody>
</table>
<h2 name="Methods">Methods</h2>
<h3 name="getKeyBindings.28.29">getKeyBindings()</h3>
<p>This method provides array of localized string of global keyboard accelerator for the given action index supported by accessible.</p>
<pre class="eval"> nsIDOMDOMStringList getKeyBindings(
   in PRUint8 aActionIndex
 );
</pre>
<h6 name="Parameters">Parameters</h6>
<dl><dt><code>aActionIndex</code> </dt><dd>Index of the given action. </dd></dl>
<h6 name="Return_value">Return value</h6>
<p>Returns array of localized string of global keyboard accelerator.</p>
<h3 name="getFinalState.28.29">getFinalState()</h3>
<p>This method retrieves a final state. Accessible states -- bit fields which describe boolean properties of node. Many states are only valid given a certain role attribute that supports them.</p>
<pre class="eval"> void getFinalState(
   out unsigned long aState, 
   out unsigned long aExtraState
 );
</pre>
<h6 name="Parameters_2">Parameters</h6>
<dl><dt><code>aState</code> </dt><dd>The first bit field (See: {{ Interface("nsIAccessibleStates") }} <code>STATE_*</code> constants). </dd><dt><code>aExtraState</code> </dt><dd>The second bit field (See: {{ Interface("nsIAccessibleStates") }} <code>EXT_STATE_*</code> constants). </dd></dl>
<h3 name="groupPosition.28.29">groupPosition()</h3>
<p>This method returns grouping information. Used for tree items, list items, tab panel labels, radio buttons, etc. Also used for collectons of non-text objects.</p>
<pre class="eval"> void groupPosition(
   out long aGroupLevel, 
   out long aSimilarItemsInGroup,
   out long aPositionInGroup
 );
</pre>
<h6 name="Parameters_3">Parameters</h6>
<dl><dt><code>aGroupLevel</code> </dt><dd>1-based, similar to ARIA <code>level</code> property. </dd><dt><code>aSimilarItemsInGroup</code> </dt><dd>1-based, similar to ARIA <code>setsize</code> property, inclusive of the current item. </dd><dt><code>aPositionInGroup</code> </dt><dd>1-based, similar to ARIA <code>posinset</code> property. </dd></dl>
<h3 name="getChildAtPoint.28.29">getChildAtPoint()</h3>
<p>This method returns an accessible child which contains the coordinate at (x, y) in screen pixels.</p>
<p>If the point is in the current accessible but not in a child, the current accessible will be returned.</p>
<p>If the point is in neither the current accessible or a child, then <code>NULL</code> will be returned.</p>
<pre class="eval"> nsIAccessible getChildAtPoint(
   in long x, 
   in long y
 );
</pre>
<h6 name="Parameters_4">Parameters</h6>
<dl><dt><code>x</code> </dt><dd>Accessible's X-coordinate. </dd><dt><code>y</code> </dt><dd>Accessible's Y-coordinate. </dd></dl>
<h6 name="Return_value_2">Return value</h6>
<p>Returns an accessible child at given (x, y) coordinate.</p>
<h3 name="getChildAt.28.29">getChildAt()</h3>
<p>This method returns Nth accessible child using zero-based index or last child if index than less than zero.</p>
<pre class="eval"> nsIAccessible getChildAt(
   in long aChildIndex
 );
</pre>
<h6 name="Parameters_5">Parameters</h6>
<dl><dt><code>aChildIndex</code> </dt><dd>The index of the Nth child. </dd></dl>
<h6 name="Return_value_3">Return value</h6>
<p>Returns Nth accessible child using zero-based index or last child if index is less than zero.</p>
<h3 name="getAccessibleToRight.28.29">getAccessibleToRight()</h3>
<p>This method returns an accessible node geometrically to the right of this one.</p>
<pre class="eval"> nsIAccessible getAccessibleToRight();
</pre>
<h6 name="Parameters_6">Parameters</h6>
<p>None.</p>
<h6 name="Return_value_4">Return value</h6>
<p>Returns an accessible node geometrically to the right of this one.</p>
<h3 name="getAccessibleToLeft.28.29">getAccessibleToLeft()</h3>
<p>This method returns an accessible node geometrically to the left of this one.</p>
<pre class="eval"> nsIAccessible getAccessibleToLeft();
</pre>
<h6 name="Parameters_7">Parameters</h6>
<p>None.</p>
<h6 name="Return_value_5">Return value</h6>
<p>Returns an accessible node geometrically to the left of this one.</p>
<h3 name="getAccessibleAbove.28.29">getAccessibleAbove()</h3>
<p>This method returns an accessible node geometrically above this one.</p>
<pre class="eval"> nsIAccessible getAccessibleAbove();
</pre>
<h6 name="Parameters_8">Parameters</h6>
<p>None.</p>
<h6 name="Return_value_6">Return value</h6>
<p>Returns an accessible node geometrically above this one.</p>
<h3 name="getAccessibleBelow.28.29">getAccessibleBelow()</h3>
<p>This method returns an accessible node geometrically below this one.</p>
<pre class="eval"> nsIAccessible getAccessibleBelow();
</pre>
<h6 name="Parameters_9">Parameters</h6>
<p>None.</p>
<h6 name="Return_value_7">Return value</h6>
<p>Returns an accessible node geometrically below this one.</p>
<h3 name="getAccessibleRelated.28.29">getAccessibleRelated()</h3>
<p>This method returns an accessible related to this one by the given relation type (See: constants defined in {{ Interface("nsIAccessibleRelation") }}).</p>
<pre class="eval"> nsIAccessible getAccessibleRelated(
   in unsigned long aRelationType
 );
</pre>
<h6 name="Parameters_10">Parameters</h6>
<dl><dt><code>aRelationType</code> </dt><dd>The relation type between the accessible. </dd></dl>
<h6 name="Return_value_8">Return value</h6>
<p>Returns an accessible which is related to the one provided by the given relation type.</p>
<h3 name="getRelation.28.29">getRelation()</h3>
<p>This method returns one accessible relation for this object.</p>
<pre class="eval"> nsIAccessibleRelation getRelation(
   in unsigned long index
 );
</pre>
<h6 name="Parameters_11">Parameters</h6>
<dl><dt><code>index</code> </dt><dd>The index for which relation is to be retrieved. </dd></dl>
<h6 name="Return_value_9">Return value</h6>
<p>Returns one accessible relation for this object.</p>
<h3 name="getRelations.28.29">getRelations()</h3>
<p>This method returns multiple accessible relations for this object.</p>
<pre class="eval"> nsIArray getRelations();
</pre>
<h6 name="Parameters_12">Parameters</h6>
<p>None.</p>
<h6 name="Return_value_10">Return value</h6>
<p>Returns multiple accessible relations for this object.</p>
<h3 name="getBounds.28.29">getBounds()</h3>
<p>This method returns accessible's (x and y) coordinates relative to the screen and accessible's width and height.</p>
<pre class="eval"> void getBounds(
   out long x, 
   out long y, 
   out long width, 
   out long height
 );
</pre>
<h6 name="Parameters_13">Parameters</h6>
<dl><dt><code>x</code> </dt><dd>Accessible's X-coordinate. </dd><dt><code>y</code> </dt><dd>Accessible's Y-coordinate. </dd><dt><code>width</code> </dt><dd>Accessible's width. </dd><dt><code>height</code> </dt><dd>Accessible's height. </dd></dl>
<h6 name="Return_value_11">Return value</h6>
<p>Returns accessible's (x and y) coordinates relative to the screen and accessible's width and height.</p>
<h3 name="setSelected.28.29">setSelected()</h3>
<p>This method adds or remove this accessible to the current selection.</p>
<pre class="eval"> void setSelected(
   in boolean isSelected
 );
</pre>
<h6 name="Parameters_14">Parameters</h6>
<dl><dt><code>isSelected</code> </dt><dd>The current selection. </dd></dl>
<h3 name="extendSelection.28.29">extendSelection()</h3>
<p>This method extends the current selection from its current accessible anchor node to this accessible.</p>
<pre class="eval"> void extendSelection();
</pre>
<h6 name="Parameters_15">Parameters</h6>
<p>None.</p>
<h3 name="takeSelection.28.29">takeSelection()</h3>
<p>This method selects this accessible node only.</p>
<pre class="eval"> void takeSelection();
</pre>
<h6 name="Parameters_16">Parameters</h6>
<p>None.</p>
<h3 name="takeFocus.28.29">takeFocus()</h3>
<p>This method focuses this accessible node.</p>
<p>The state <code>STATE_FOCUSABLE</code> indicates whether this node is normally focusable. It is the callers responsibility to determine whether this node is focusable.<code>accTakeFocus</code> on a node that is not normally focusable (such as a table), will still set focus on that node, although normally that will not be visually indicated in most style sheets.</p>
<pre class="eval"> void takeFocus();
</pre>
<h6 name="Parameters_17">Parameters</h6>
<p>None.</p>
<h3 name="getActionName.28.29">getActionName()</h3>
<p>This method retrieves the name of the accessible action at the given zero-based index.</p>
<pre class="eval"> AString getActionName(
   in PRUint8 index
 );
</pre>
<h6 name="Parameters_18">Parameters</h6>
<dl><dt><code>index</code> </dt><dd>The zero-based index. </dd></dl>
<h6 name="Return_value_12">Return value</h6>
<p>Returns the name of the accessible action.</p>
<h3 name="getActionDescription.28.29">getActionDescription()</h3>
<p>This method retrieves the description of the accessible action at the given zero-based index.</p>
<pre class="eval"> AString getActionDescription(
   in PRUint8 aIndex
 );
</pre>
<h6 name="Parameters_19">Parameters</h6>
<dl><dt><code>aIndex</code> </dt><dd>The zero-based index. </dd></dl>
<h6 name="Return_value_13">Return value</h6>
<p>Returns the description of the accessible action.</p>
<h3 name="doAction.28.29">doAction()</h3>
<p>This method performs the accessible action at the given zero-based index. Action number <code>0</code> is the default action.</p>
<pre class="eval"> void doAction(
   in PRUint8 index
 ); 
</pre>
<h6 name="Parameters_20">Parameters</h6>
<dl><dt><code>index</code> </dt><dd>The zero-based index. </dd></dl>
<h3 name="See_also">See also</h3>
<ul> <li><a href="/en/Accessibility" title="en/Accessibility">Accessibility</a></li> <li><a href="/en/NsIPersistentProperties" title="en/NsIPersistentProperties">nsIPersistentProperties</a></li> <li><a href="/en/NsIDOMDOMStringList" title="en/NsIDOMDOMStringList">nsIDOMDOMStringList</a></li> <li><a href="/en/NsIAccessibleRelation" title="en/NsIAccessibleRelation">nsIAccessibleRelation</a></li>
</ul>
<p> </p>
Revert to this revision