Skip to main content

cdp_driver/methods/
accessibility.rs

1// @generated by `just generate-methods` from protocol/*.json.
2// Do not edit by hand; edit xtask/ and regenerate.
3
4//! The `Accessibility` domain.
5//!
6//! Method names for the `Accessibility` domain, for use with
7//! [`CdpClient::call`](crate::CdpClient::call).
8//!
9//! This domain is experimental and may change without notice.
10
11/// Disables the accessibility domain.
12pub const DISABLE: &str = "Accessibility.disable";
13
14/// Enables the accessibility domain which causes `AXNodeId`s to remain
15/// consistent between method calls. This turns on accessibility for the page,
16/// which can impact performance until accessibility is disabled.
17pub const ENABLE: &str = "Accessibility.enable";
18
19/// Fetches the accessibility node and partial accessibility tree for this DOM
20/// node, if it exists.
21///
22/// Experimental: may change without notice.
23///
24/// Parameters:
25/// - `nodeId`: DOM.NodeId (optional)
26/// - `backendNodeId`: DOM.BackendNodeId (optional)
27/// - `objectId`: Runtime.RemoteObjectId (optional)
28/// - `fetchRelatives`: boolean (optional)
29///
30/// Returns: `nodes`
31pub const GET_PARTIAL_AX_TREE: &str = "Accessibility.getPartialAXTree";
32
33/// Fetches the entire accessibility tree for the root Document
34///
35/// Experimental: may change without notice.
36///
37/// Parameters:
38/// - `depth`: integer (optional)
39/// - `frameId`: Page.FrameId (optional)
40///
41/// Returns: `nodes`
42pub const GET_FULL_AX_TREE: &str = "Accessibility.getFullAXTree";
43
44/// Fetches the root node. Requires `enable()` to have been called previously.
45///
46/// Experimental: may change without notice.
47///
48/// Parameters:
49/// - `frameId`: Page.FrameId (optional)
50///
51/// Returns: `node`
52pub const GET_ROOT_AX_NODE: &str = "Accessibility.getRootAXNode";
53
54/// Fetches a node and all ancestors up to and including the root. Requires
55/// `enable()` to have been called previously.
56///
57/// Experimental: may change without notice.
58///
59/// Parameters:
60/// - `nodeId`: DOM.NodeId (optional)
61/// - `backendNodeId`: DOM.BackendNodeId (optional)
62/// - `objectId`: Runtime.RemoteObjectId (optional)
63///
64/// Returns: `nodes`
65pub const GET_AX_NODE_AND_ANCESTORS: &str = "Accessibility.getAXNodeAndAncestors";
66
67/// Fetches a particular accessibility node by AXNodeId. Requires `enable()`
68/// to have been called previously.
69///
70/// Experimental: may change without notice.
71///
72/// Parameters:
73/// - `id`: AXNodeId
74/// - `frameId`: Page.FrameId (optional)
75///
76/// Returns: `nodes`
77pub const GET_CHILD_AX_NODES: &str = "Accessibility.getChildAXNodes";
78
79/// Query a DOM node's accessibility subtree for accessible name and role.
80/// This command computes the name and role for all nodes in the subtree,
81/// including those that are ignored for accessibility, and returns those that
82/// match the specified name and role. If no DOM node is specified, or the DOM
83/// node does not exist, the command returns an error. If neither
84/// `accessibleName` or `role` is specified, it returns all the accessibility
85/// nodes in the subtree.
86///
87/// Experimental: may change without notice.
88///
89/// Parameters:
90/// - `nodeId`: DOM.NodeId (optional)
91/// - `backendNodeId`: DOM.BackendNodeId (optional)
92/// - `objectId`: Runtime.RemoteObjectId (optional)
93/// - `accessibleName`: string (optional)
94/// - `role`: string (optional)
95///
96/// Returns: `nodes`
97pub const QUERY_AX_TREE: &str = "Accessibility.queryAXTree";