nsAccessible Class Reference

#include <nsAccessible.h>

Inheritance diagram for nsAccessible:

Inheritance graph
[legend]
Collaboration diagram for nsAccessible:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 nsAccessible (nsIDOMNode *aNode, nsIWeakReference *aShell)
virtual ~nsAccessible ()
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLE
NS_DECL_NSPIACCESSIBLE
NS_DECL_NSIACCESSIBLEHYPERLINK
NS_DECL_NSIACCESSIBLESELECTABLE
NS_DECL_NSIACCESSIBLEVALUE
NS_IMETHOD 
Shutdown ()
NS_IMETHOD GetState (PRUint32 *aState, PRUint32 *aExtraState)
 Return the state of accessible that doesn't take into account ARIA states.
virtual nsresult GetAttributesInternal (nsIPersistentProperties *aAttributes)
 Returns attributes for accessible without explicitly setted ARIA attributes.
already_AddRefed< nsIAccessibleGetParent ()

Static Public Member Functions

static PRBool IsTextInterfaceSupportCorrect (nsIAccessible *aAccessible)
static PRBool IsCorrectFrameType (nsIFrame *aFrame, nsIAtom *aAtom)
 Static Helper method to help sub classes make sure they have the proper frame when walking the frame tree to get at children and such.
static PRUint32 State (nsIAccessible *aAcc)
static PRUint32 Role (nsIAccessible *aAcc)
static PRBool IsText (nsIAccessible *aAcc)
static PRBool IsEmbeddedObject (nsIAccessible *aAcc)
static PRInt32 TextLength (nsIAccessible *aAccessible)
static PRBool IsLeaf (nsIAccessible *aAcc)
static PRBool IsNodeRelevant (nsIDOMNode *aNode)
static PRBool MustPrune (nsIAccessible *aAccessible)
 When exposing to platform accessibility APIs, should the children be pruned off?
static nsIContentGetRoleContent (nsIDOMNode *aDOMNode)
 Return the nsIContent* to check for ARIA attributes on -- this may not always be the DOM node for the accessible.

Protected Member Functions

PRBool MappedAttrState (nsIContent *aContent, PRUint32 *aStateInOut, nsStateMapEntry *aStateMapEntry)
virtual nsIFrameGetBoundsFrame ()
virtual void GetBoundsRect (nsRect &aRect, nsIFrame **aRelativeFrame)
PRBool IsVisible (PRBool *aIsOffscreen)
nsresult GetTextFromRelationID (nsIAtom *aIDProperty, nsString &aName)
 For a given ARIA relation, such as labelledby or describedby, get the collated text for the subtree that's pointed to.
nsresult GetHTMLName (nsAString &_retval, PRBool aCanAggregateSubtree=PR_TRUE)
 Only called if the element is not a nsIDOMXULControlElement.
nsresult GetXULName (nsAString &aName, PRBool aCanAggregateSubtree=PR_TRUE)
 3 main cases for XUL Controls to be labeled 1 - control contains label="foo" 2 - control has, as a child, a label element
  • label has either value="foo" or children 3 - non-child label contains control="controlID"
  • label has either value="foo" or children Once a label is found, the search is discontinued, so a control that has a label child as well as having a label external to the control that uses the control="controlID" syntax will use the child label for its Name.

nsresult AppendFlatStringFromSubtree (nsIContent *aContent, nsAString *aFlatString)
nsresult AppendNameFromAccessibleFor (nsIContent *aContent, nsAString *aFlatString, PRBool aFromValue=PR_FALSE)
nsresult AppendFlatStringFromContentNode (nsIContent *aContent, nsAString *aFlatString)
nsresult AppendStringWithSpaces (nsAString *aFlatString, const nsAString &textEquivalent)
nsresult AppendFlatStringFromSubtreeRecurse (nsIContent *aContent, nsAString *aFlatString)
virtual void CacheChildren ()
nsIAccessibleNextChild (nsCOMPtr< nsIAccessible > &aAccessible)
already_AddRefed< nsIAccessibleGetNextWithState (nsIAccessible *aStart, PRUint32 matchState)
already_AddRefed< nsIAccessibleGetFirstAvailableAccessible (nsIDOMNode *aStartNode, PRBool aRequireLeaf=PR_FALSE)
 Return an accessible for the given DOM node, or if that node isn't accessible, return the accessible for the next DOM node which has one (based on forward depth first search).
virtual nsresult GetLinkOffset (PRInt32 *aStartOffset, PRInt32 *aEndOffset)
nsresult DoCommand (nsIContent *aContent=nsnull)
PRBool CheckVisibilityInParentChain (nsIDocument *aDocument, nsIView *aView)
nsIDOMNodeGetAtomicRegion ()
 Get the container node for an atomic region, defined by aria-atomic="true".
nsresult GetAttrValue (nsIAtom *aAriaProperty, double *aValue)
 Get numeric value of the given ARIA attribute.

Static Protected Member Functions

static nsIContentGetHTMLLabelContent (nsIContent *aForNode)
static nsIContentGetLabelContent (nsIContent *aForNode)
static nsresult GetFullKeyName (const nsAString &aModifierName, const nsAString &aKeyName, nsAString &aStringOut)
static nsresult GetTranslatedString (const nsAString &aKey, nsAString &aStringOut)
static already_AddRefed
< nsIAccessible
GetMultiSelectFor (nsIDOMNode *aNode)
static void DoCommandCallback (nsITimer *aTimer, void *aClosure)

Protected Attributes

nsCOMPtr< nsIAccessiblemParent
nsIAccessiblemFirstChild
nsIAccessiblemNextSibling
nsRoleMapEntrymRoleMapEntry
PRInt32 mAccChildCount


Constructor & Destructor Documentation

nsAccessible::nsAccessible ( nsIDOMNode aNode,
nsIWeakReference aShell 
)

nsAccessible::~nsAccessible (  )  [virtual]


Member Function Documentation

NS_IMETHODIMP nsAccessible::Shutdown (  ) 

nsresult nsAccessible::GetState ( PRUint32 aState,
PRUint32 aExtraState 
)

Use nsIAccessible::finalState() to get all states for accessible. If second argument is omitted then second bit field of accessible state won't be calculated.

Reimplemented in nsApplicationAccessible, nsLinkableAccessible, nsDocAccessible, nsOuterDocAccessible, nsRootAccessible, nsHTMLCheckboxAccessible, nsHTMLRadioButtonAccessible, nsHTMLButtonAccessible, nsHTML4ButtonAccessible, nsHTMLTextFieldAccessible, nsHTMLImageAccessible, nsHTMLLinkAccessible, nsHTMLSelectListAccessible, nsHTMLSelectOptionAccessible, nsHTMLSelectOptGroupAccessible, nsHTMLComboboxAccessible, nsHTMLComboboxButtonAccessible, nsHTMLComboboxListAccessible, nsHTMLTableAccessible, nsHTMLTextAccessible, nsHTMLBRAccessible, nsHTMLLabelAccessible, nsHTMLListBulletAccessible, nsHTMLListAccessible, nsHTMLLIAccessible, nsHyperTextAccessible, nsXFormsAccessible, nsXFormsEditableAccessible, nsXFormsInputBooleanAccessible, nsXFormsSecretAccessible, nsXFormsRangeAccessible, nsXFormsSelectAccessible, nsXFormsItemCheckgroupAccessible, nsXFormsItemRadiogroupAccessible, nsXFormsSelectComboboxAccessible, nsXFormsItemComboboxAccessible, nsXFormsDropmarkerWidgetAccessible, nsXFormsComboboxPopupWidgetAccessible, nsXULAlertAccessible, nsXULColorPickerTileAccessible, nsXULColorPickerAccessible, nsXULButtonAccessible, nsXULCheckboxAccessible, nsXULDropmarkerAccessible, nsXULRadioButtonAccessible, nsXULRadioGroupAccessible, nsXULToolbarSeparatorAccessible, nsXULTextFieldAccessible, nsXULMenuitemAccessible, nsXULMenuSeparatorAccessible, nsXULMenupopupAccessible, nsXULMenubarAccessible, nsXULColumnsAccessible, nsXULColumnItemAccessible, nsXULListboxAccessible, nsXULListitemAccessible, nsXULComboboxAccessible, nsXULTabAccessible, nsXULTextAccessible, nsXULTooltipAccessible, nsXULLinkAccessible, nsXULTreeAccessible, and nsXULTreeitemAccessible.

nsresult nsAccessible::GetAttributesInternal ( nsIPersistentProperties aAttributes  )  [virtual]

nsAccessNode PRBool nsAccessible::IsTextInterfaceSupportCorrect ( nsIAccessible aAccessible  )  [static]

PRBool nsAccessible::IsCorrectFrameType ( nsIFrame aFrame,
nsIAtom aAtom 
) [static]

static PRUint32 nsAccessible::State ( nsIAccessible aAcc  )  [inline, static]

static PRUint32 nsAccessible::Role ( nsIAccessible aAcc  )  [inline, static]

static PRBool nsAccessible::IsText ( nsIAccessible aAcc  )  [inline, static]

static PRBool nsAccessible::IsEmbeddedObject ( nsIAccessible aAcc  )  [inline, static]

PRInt32 nsAccessible::TextLength ( nsIAccessible aAccessible  )  [static]

static PRBool nsAccessible::IsLeaf ( nsIAccessible aAcc  )  [inline, static]

PRBool nsAccessible::IsNodeRelevant ( nsIDOMNode aNode  )  [static]

PRBool nsAccessible::MustPrune ( nsIAccessible aAccessible  )  [static]

already_AddRefed<nsIAccessible> nsAccessible::GetParent (  )  [inline]

nsIContent * nsAccessible::GetRoleContent ( nsIDOMNode aDOMNode  )  [static]

Specifically, for doc accessibles, it is not the document node, but either the root element or <body> in HTML.

Parameters:
aDOMNode The DOM node for the accessible that may be affected by ARIA
Returns:
The nsIContent which may have ARIA markup

PRBool nsAccessible::MappedAttrState ( nsIContent aContent,
PRUint32 aStateInOut,
nsStateMapEntry aStateMapEntry 
) [protected]

nsIFrame * nsAccessible::GetBoundsFrame (  )  [protected, virtual]

Reimplemented in nsHTMLSelectOptionAccessible.

void nsAccessible::GetBoundsRect ( nsRect aRect,
nsIFrame **  aRelativeFrame 
) [protected, virtual]

PRBool nsAccessible::IsVisible ( PRBool aIsOffscreen  )  [protected]

nsresult nsAccessible::GetTextFromRelationID ( nsIAtom aIDProperty,
nsString aName 
) [protected]

Parameters:
aIDProperty The ARIA relationship property to get the text for
aName Where to put the text
Returns:
error or success code

nsIContent * nsAccessible::GetHTMLLabelContent ( nsIContent aForNode  )  [static, protected]

nsIContent * nsAccessible::GetLabelContent ( nsIContent aForNode  )  [static, protected]

nsresult nsAccessible::GetHTMLName ( nsAString aLabel,
PRBool  aCanAggregateSubtree = PR_TRUE 
) [protected]

Initially walks up the DOM tree to the form, concatonating label elements as it goes. Then checks for labels with the for="controlID" property.

nsresult nsAccessible::GetXULName ( nsAString aName,
PRBool  aCanAggregateSubtree = PR_TRUE 
) [protected]

nsresult nsAccessible::AppendFlatStringFromSubtree ( nsIContent aContent,
nsAString aFlatString 
) [protected]

Reimplemented in nsXULSelectableAccessible.

nsresult nsAccessible::AppendNameFromAccessibleFor ( nsIContent aContent,
nsAString aFlatString,
PRBool  aFromValue = PR_FALSE 
) [protected]

nsresult nsAccessible::AppendFlatStringFromContentNode ( nsIContent aContent,
nsAString aFlatString 
) [protected]

nsresult nsAccessible::AppendStringWithSpaces ( nsAString aFlatString,
const nsAString textEquivalent 
) [protected]

nsresult nsAccessible::GetFullKeyName ( const nsAString aModifierName,
const nsAString aKeyName,
nsAString aStringOut 
) [static, protected]

nsresult nsAccessible::GetTranslatedString ( const nsAString aKey,
nsAString aStringOut 
) [static, protected]

nsresult nsAccessible::AppendFlatStringFromSubtreeRecurse ( nsIContent aContent,
nsAString aFlatString 
) [protected]

void nsAccessible::CacheChildren (  )  [protected, virtual]

nsIAccessible * nsAccessible::NextChild ( nsCOMPtr< nsIAccessible > &  aAccessible  )  [protected]

already_AddRefed< nsIAccessible > nsAccessible::GetNextWithState ( nsIAccessible aStart,
PRUint32  matchState 
) [protected]

already_AddRefed< nsIAccessible > nsAccessible::GetFirstAvailableAccessible ( nsIDOMNode aStartNode,
PRBool  aRequireLeaf = PR_FALSE 
) [protected]

Parameters:
aStartNode,the DOM node to start from
aRequireLeaf,only accept leaf accessible nodes
Returns:
the resulting accessible

already_AddRefed< nsIAccessible > nsAccessible::GetMultiSelectFor ( nsIDOMNode aNode  )  [static, protected]

nsresult nsAccessible::GetLinkOffset ( PRInt32 aStartOffset,
PRInt32 aEndOffset 
) [protected, virtual]

void nsAccessible::DoCommandCallback ( nsITimer aTimer,
void *  aClosure 
) [static, protected]

nsresult nsAccessible::DoCommand ( nsIContent aContent = nsnull  )  [protected]

PRBool nsAccessible::CheckVisibilityInParentChain ( nsIDocument aDocument,
nsIView aView 
) [protected]

nsIDOMNode * nsAccessible::GetAtomicRegion (  )  [protected]

Returns:
the container node

nsresult nsAccessible::GetAttrValue ( nsIAtom aAriaProperty,
double aValue 
) [protected]

Parameters:
aAriaProperty - the ARIA property we're using
aValue - value of the attribute
Returns:
- NS_OK_NO_ARIA_VALUE if there is no setted ARIA attribute


Member Data Documentation

nsCOMPtr<nsIAccessible> nsAccessible::mParent [protected]


The documentation for this class was generated from the following files:

Generated Mozilla by doxygen 1.5.6