Accessibility
ExperimentalDependencies: DOM
No symbols match your filter.
Commands
Accessibility.disable
Disables the accessibility domain.
Accessibility.enable
Enables the accessibility domain which causes `AXNodeId`s to remain consistent between method calls.
This turns on accessibility for the page, which can impact performance until accessibility is disabled.
Accessibility.getPartialAXTree
Experimental Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.
Parameters
| Name | Type | Description |
|---|---|---|
nodeId
(optional) |
DOM.NodeId |
Identifier of the node to get the partial accessibility tree for. |
backendNodeId
(optional) |
DOM.BackendNodeId |
Identifier of the backend node to get the partial accessibility tree for. |
objectId
(optional) |
Runtime.RemoteObjectId |
JavaScript object id of the node wrapper to get the partial accessibility tree for. |
fetchRelatives
(optional) |
boolean |
Whether to fetch this node's ancestors, siblings and children. Defaults to true. |
Return Object
| Name | Type | Description |
|---|---|---|
nodes
|
array<AXNode> |
The `Accessibility.AXNode` for this DOM node, if it exists, plus its ancestors, siblings and children, if requested. |
Accessibility.getFullAXTree
Experimental Fetches the entire accessibility tree for the root Document
Parameters
| Name | Type | Description |
|---|---|---|
depth
(optional) |
integer |
The maximum depth at which descendants of the root node should be retrieved. If omitted, the full tree is returned. |
frameId
(optional) |
Page.FrameId |
The frame for whose document the AX tree should be retrieved. If omitted, the root frame is used. |
Return Object
| Name | Type | Description |
|---|---|---|
nodes
|
array<AXNode> |
Accessibility.getRootAXNode
Experimental Fetches the root node.
Requires `enable()` to have been called previously.
Parameters
| Name | Type | Description |
|---|---|---|
frameId
(optional) |
Page.FrameId |
The frame in whose document the node resides. If omitted, the root frame is used. |
Return Object
| Name | Type | Description |
|---|---|---|
node
|
AXNode |
Accessibility.getAXNodeAndAncestors
Experimental Fetches a node and all ancestors up to and including the root.
Requires `enable()` to have been called previously.
Parameters
| Name | Type | Description |
|---|---|---|
nodeId
(optional) |
DOM.NodeId |
Identifier of the node to get. |
backendNodeId
(optional) |
DOM.BackendNodeId |
Identifier of the backend node to get. |
objectId
(optional) |
Runtime.RemoteObjectId |
JavaScript object id of the node wrapper to get. |
Return Object
| Name | Type | Description |
|---|---|---|
nodes
|
array<AXNode> |
Accessibility.getChildAXNodes
Experimental Fetches a particular accessibility node by AXNodeId.
Requires `enable()` to have been called previously.
Parameters
| Name | Type | Description |
|---|---|---|
id
|
AXNodeId |
|
frameId
(optional) |
Page.FrameId |
The frame in whose document the node resides. If omitted, the root frame is used. |
Return Object
| Name | Type | Description |
|---|---|---|
nodes
|
array<AXNode> |
Accessibility.queryAXTree
Experimental Query a DOM node's accessibility subtree for accessible name and role.
This command computes the name and role for all nodes in the subtree, including those that are
ignored for accessibility, and returns those that match the specified name and role. If no DOM
node is specified, or the DOM node does not exist, the command returns an error. If neither
`accessibleName` or `role` is specified, it returns all the accessibility nodes in the subtree.
Parameters
| Name | Type | Description |
|---|---|---|
nodeId
(optional) |
DOM.NodeId |
Identifier of the node for the root to query. |
backendNodeId
(optional) |
DOM.BackendNodeId |
Identifier of the backend node for the root to query. |
objectId
(optional) |
Runtime.RemoteObjectId |
JavaScript object id of the node wrapper for the root to query. |
accessibleName
(optional) |
string |
Find nodes with this computed name. |
role
(optional) |
string |
Find nodes with this computed role. |
Return Object
| Name | Type | Description |
|---|---|---|
nodes
|
array<AXNode> |
A list of `Accessibility.AXNode` matching the specified attributes, including nodes that are ignored for accessibility. |
Events
Accessibility.loadComplete
Experimental The loadComplete event mirrors the load complete event sent by the browser to assistive
technology when the web page has finished loading.
Parameters
| Name | Type | Description |
|---|---|---|
root
|
AXNode |
New document root node. |
Accessibility.nodesUpdated
Experimental The nodesUpdated event is sent every time a previously requested node has changed the in tree.
Parameters
| Name | Type | Description |
|---|---|---|
nodes
|
array<AXNode> |
Updated node data. |
Types
AXNodeId
(string)
Unique accessibility node identifier.
AXValueType
(string)
Enum of possible property types.
Allowed Values
booleantristatebooleanOrUndefinedidrefidrefListintegernodenodeListnumberstringcomputedStringtokentokenListdomRelationroleinternalRolevalueUndefined
AXValueSourceType
(string)
Enum of possible property sources.
Allowed Values
attributeimplicitstylecontentsplaceholderrelatedElement
AXValueNativeSourceType
(string)
Enum of possible native property sources (as a subtype of a particular AXValueSourceType).
Allowed Values
descriptionfigcaptionlabellabelforlabelwrappedlegendrubyannotationtablecaptiontitleother
AXValueSource
(object)
A single source for a computed AX property.
Properties
| Name | Type | Description |
|---|---|---|
type
|
AXValueSourceType |
What type of source this is. |
value
(optional) |
AXValue |
The value of this property source. |
attribute
(optional) |
string |
The name of the relevant attribute, if any. |
attributeValue
(optional) |
AXValue |
The value of the relevant attribute, if any. |
superseded
(optional) |
boolean |
Whether this source is superseded by a higher priority source. |
nativeSource
(optional) |
AXValueNativeSourceType |
The native markup source for this value, e.g. a `<label>` element. |
nativeSourceValue
(optional) |
AXValue |
The value, such as a node or node list, of the native source. |
invalid
(optional) |
boolean |
Whether the value for this property is invalid. |
invalidReason
(optional) |
string |
Reason for the value being invalid, if it is. |
AXRelatedNode
(object)
Properties
| Name | Type | Description |
|---|---|---|
backendDOMNodeId
|
DOM.BackendNodeId |
The BackendNodeId of the related DOM node. |
idref
(optional) |
string |
The IDRef value provided, if any. |
text
(optional) |
string |
The text alternative of this node in the current context. |
AXProperty
(object)
Properties
| Name | Type | Description |
|---|---|---|
name
|
AXPropertyName |
The name of this property. |
value
|
AXValue |
The value of this property. |
AXValue
(object)
A single computed AX property.
Properties
| Name | Type | Description |
|---|---|---|
type
|
AXValueType |
The type of this value. |
value
(optional) |
any |
The computed value of this property. |
relatedNodes
(optional) |
array<AXRelatedNode> |
One or more related nodes, if applicable. |
sources
(optional) |
array<AXValueSource> |
The sources which contributed to the computation of this property. |
AXPropertyName
(string)
Values of AXProperty name:
- from 'busy' to 'roledescription': states which apply to every AX node
- from 'live' to 'root': attributes which apply to nodes in live regions
- from 'autocomplete' to 'valuetext': attributes which apply to widgets
- from 'checked' to 'selected': states which apply to widgets
- from 'activedescendant' to 'owns': relationships between elements other than parent/child/sibling
- from 'activeFullscreenElement' to 'uninteresting': reasons why this noode is hidden
Allowed Values
actionsbusydisablededitablefocusablefocusedhiddenhiddenRootinvalidkeyshortcutssettableroledescriptionliveatomicrelevantrootautocompletehasPopuplevelmultiselectableorientationmultilinereadonlyrequiredvalueminvaluemaxvaluetextcheckedexpandedmodalpressedselectedactivedescendantcontrolsdescribedbydetailserrormessageflowtolabelledbyownsurlactiveFullscreenElementactiveModalDialogactiveAriaModalDialogariaHiddenElementariaHiddenSubtreeemptyAltemptyTextinertElementinertSubtreelabelContainerlabelFornotRenderednotVisiblepresentationalRoleprobablyPresentationalinactiveCarouselTabContentuninteresting
AXNode
(object)
A node in the accessibility tree.
Properties
| Name | Type | Description |
|---|---|---|
nodeId
|
AXNodeId |
Unique identifier for this node. |
ignored
|
boolean |
Whether this node is ignored for accessibility |
ignoredReasons
(optional) |
array<AXProperty> |
Collection of reasons why this node is hidden. |
role
(optional) |
AXValue |
This `Node`'s role, whether explicit or implicit. |
chromeRole
(optional) |
AXValue |
This `Node`'s Chrome raw role. |
name
(optional) |
AXValue |
The accessible name for this `Node`. |
description
(optional) |
AXValue |
The accessible description for this `Node`. |
value
(optional) |
AXValue |
The value for this `Node`. |
properties
(optional) |
array<AXProperty> |
All other properties |
parentId
(optional) |
AXNodeId |
ID for this node's parent. |
childIds
(optional) |
array<AXNodeId> |
IDs for each of this node's child nodes. |
backendDOMNodeId
(optional) |
DOM.BackendNodeId |
The backend ID for the associated DOM node, if any. |
frameId
(optional) |
Page.FrameId |
The frame ID for the frame associated with this nodes document. |