clj-chrome-devtools.commands.accessibility
disable
(disable)
(disable {:as params, :keys []})
(disable connection {:as params, :keys []})
Disables the accessibility domain.
enable
(enable)
(enable {:as params, :keys []})
(enable connection {:as params, :keys []})
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.
get-ax-node-and-ancestors
(get-ax-node-and-ancestors)
(get-ax-node-and-ancestors {:as params, :keys [node-id backend-node-id object-id]})
(get-ax-node-and-ancestors connection {:as params, :keys [node-id backend-node-id object-id]})
Fetches a node and all ancestors up to and including the root. Requires enable()
to have been called previously.
Parameters map keys:
Key | Description |
---|---|
:node-id | Identifier of the node to get. (optional) |
:backend-node-id | Identifier of the backend node to get. (optional) |
:object-id | JavaScript object id of the node wrapper to get. (optional) |
Return map keys:
Key | Description |
---|---|
:nodes | null |
get-child-ax-nodes
(get-child-ax-nodes)
(get-child-ax-nodes {:as params, :keys [id frame-id]})
(get-child-ax-nodes connection {:as params, :keys [id frame-id]})
Fetches a particular accessibility node by AXNodeId. Requires enable()
to have been called previously.
Parameters map keys:
Key | Description |
---|---|
:id | null |
:frame-id | The frame in whose document the node resides. |
If omitted, the root frame is used. (optional)
Return map keys:
Key | Description |
---|---|
:nodes | null |
get-full-ax-tree
(get-full-ax-tree)
(get-full-ax-tree {:as params, :keys [depth frame-id]})
(get-full-ax-tree connection {:as params, :keys [depth frame-id]})
Fetches the entire accessibility tree for the root Document
Parameters map keys:
Key | Description |
---|---|
:depth | The maximum depth at which descendants of the root node should be retrieved. |
If omitted, the full tree is returned. (optional) :frame-id | The frame for whose document the AX tree should be retrieved. If omited, the root frame is used. (optional)
Return map keys:
Key | Description |
---|---|
:nodes | null |
get-partial-ax-tree
(get-partial-ax-tree)
(get-partial-ax-tree {:as params, :keys [node-id backend-node-id object-id fetch-relatives]})
(get-partial-ax-tree connection {:as params, :keys [node-id backend-node-id object-id fetch-relatives]})
Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.
Parameters map keys:
Key | Description |
---|---|
:node-id | Identifier of the node to get the partial accessibility tree for. (optional) |
:backend-node-id | Identifier of the backend node to get the partial accessibility tree for. (optional) |
:object-id | JavaScript object id of the node wrapper to get the partial accessibility tree for. (optional) |
:fetch-relatives | Whether to fetch this nodes ancestors, siblings and children. Defaults to true. (optional) |
Return map keys:
Key | Description |
---|---|
:nodes | The Accessibility.AXNode for this DOM node, if it exists, plus its ancestors, siblings and |
children, if requested.
get-root-ax-node
(get-root-ax-node)
(get-root-ax-node {:as params, :keys [frame-id]})
(get-root-ax-node connection {:as params, :keys [frame-id]})
Fetches the root node. Requires enable()
to have been called previously.
Parameters map keys:
Key | Description |
---|---|
:frame-id | The frame in whose document the node resides. |
If omitted, the root frame is used. (optional)
Return map keys:
Key | Description |
---|---|
:node | null |
query-ax-tree
(query-ax-tree)
(query-ax-tree {:as params, :keys [node-id backend-node-id object-id accessible-name role]})
(query-ax-tree connection {:as params, :keys [node-id backend-node-id object-id accessible-name role]})
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 mactch 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 map keys:
Key | Description |
---|---|
:node-id | Identifier of the node for the root to query. (optional) |
:backend-node-id | Identifier of the backend node for the root to query. (optional) |
:object-id | JavaScript object id of the node wrapper for the root to query. (optional) |
:accessible-name | Find nodes with this computed name. (optional) |
:role | Find nodes with this computed role. (optional) |
Return map keys:
Key | Description |
---|---|
:nodes | A list of Accessibility.AXNode matching the specified attributes, |
including nodes that are ignored for accessibility.