nsIAccessibleDocument

An interface for in-process accessibility clients that wish to retrieve information about a document. When accessibility is turned on in Gecko, there is an nsIAccessibleDocument for each document whether it is XUL, HTML or whatever.
Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)

You can QueryInterface to nsIAccessibleDocument from the nsIAccessible or nsIAccessNode for the root node of a document. You can also get one from nsIAccessNode.GetAccessibleDocument() or nsIAccessibleEvent.GetAccessibleDocument()

Method overview

nsIAccessible getAccessibleInParentChain(in nsIDOMNode aDOMNode, in boolean aCanCreate); Obsolete since Gecko 2.0
nsIAccessNode getCachedAccessNode(in voidPtr aUniqueID); Native code only! Obsolete since Gecko 2.0
AString getNameSpaceURIForID(in short nameSpaceID);

Attributes

Attribute Type Description
caretAccessible nsIAccessible Read only. Obsolete since Gecko 1.9
docType AString The doc type of the document, as specified in the document. Read only.
DOMDocument nsIDOMDocument The nsIDOMDocument interface associated with this document. Read only. Renamed from document in Gecko 2.0
isEditable boolean True if the document is live in an editor. False if the document is being displayed but not edited. If a <div> is contentEditable, then it has its own document, with isEditable == true. Read only. Obsolete since Gecko 1.9
mimeType AString The mime type of the document. Read only.
title AString The title of the document, as specified in the document. Read only.
URL AString The URL of the document Read only.
window nsIDOMWindow The nsIDOMWindow that the document resides in. Read only.
windowHandle voidPtr The window handle for the OS window the document is being displayed in. For example, in Windows you can static cast it to an HWND. Read only. Native code only!

Methods

Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)

getAccessibleInParentChain()

Returns the first accessible parent of a DOM node. Guaranteed not to return null if the DOM node is in a document.

nsIAccessible getAccessibleInParentChain(
  in nsIDOMNode aDOMNode,
  in boolean aCanCreate 
);
Parameters
aDOMNode
The DOM node we need an accessible for.
aCanCreate
If true, this method can create a new accessible. Otherwise, it will return the first cached accessible in the parent chain.
Return value

The first nsIAccessible found by crawling up the DOM node to the document root.

Native code only!

getCachedAccessNode

Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

Returns the access node cached by this document.

nsIAccessNode getCachedAccessNode(
  in voidPtr aUniqueID
);
Parameters
aUniqueID
The unique ID used to cache the node. This matches up with the uniqueID attribute on nsIAccessNode.
Return value

The nsIAccessNode cached for this particular unique ID.

getNameSpaceURIForID()

The namespace for each ID that is handed back.

AString getNameSpaceURIForID(
  in short nameSpaceID
);
Parameters
nameSpaceID
The ID of the name space.
Return value

The name space for given ID.

See also

Document Tags and Contributors

Contributors to this page: Arehman4, trevorh, Surkov.alexander, Sheppy
Last updated by: Sheppy,