2626
2727
2828async def disable () -> None :
29- '''
29+ r '''
3030 Disables the accessibility domain.
3131 '''
3232 session = get_session_context ('accessibility.disable' )
3333 return await session .execute (cdp .accessibility .disable ())
3434
3535
3636async def enable () -> None :
37- '''
37+ r '''
3838 Enables the accessibility domain which causes ``AXNodeId``'s to remain consistent between method calls.
3939 This turns on accessibility for the page, which can impact performance until accessibility is disabled.
4040 '''
@@ -47,7 +47,7 @@ async def get_ax_node_and_ancestors(
4747 backend_node_id : typing .Optional [cdp .dom .BackendNodeId ] = None ,
4848 object_id : typing .Optional [cdp .runtime .RemoteObjectId ] = None
4949 ) -> typing .List [AXNode ]:
50- '''
50+ r '''
5151 Fetches a node and all ancestors up to and including the root.
5252 Requires ``enable()`` to have been called previously.
5353
@@ -66,7 +66,7 @@ async def get_child_ax_nodes(
6666 id_ : AXNodeId ,
6767 frame_id : typing .Optional [cdp .page .FrameId ] = None
6868 ) -> typing .List [AXNode ]:
69- '''
69+ r '''
7070 Fetches a particular accessibility node by AXNodeId.
7171 Requires ``enable()`` to have been called previously.
7272
@@ -85,7 +85,7 @@ async def get_full_ax_tree(
8585 max_depth : typing .Optional [int ] = None ,
8686 frame_id : typing .Optional [cdp .page .FrameId ] = None
8787 ) -> typing .List [AXNode ]:
88- '''
88+ r '''
8989 Fetches the entire accessibility tree for the root Document
9090
9191 **EXPERIMENTAL**
@@ -105,7 +105,7 @@ async def get_partial_ax_tree(
105105 object_id : typing .Optional [cdp .runtime .RemoteObjectId ] = None ,
106106 fetch_relatives : typing .Optional [bool ] = None
107107 ) -> typing .List [AXNode ]:
108- '''
108+ r '''
109109 Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.
110110
111111 **EXPERIMENTAL**
@@ -123,7 +123,7 @@ async def get_partial_ax_tree(
123123async def get_root_ax_node (
124124 frame_id : typing .Optional [cdp .page .FrameId ] = None
125125 ) -> AXNode :
126- '''
126+ r '''
127127 Fetches the root node.
128128 Requires ``enable()`` to have been called previously.
129129
@@ -143,7 +143,7 @@ async def query_ax_tree(
143143 accessible_name : typing .Optional [str ] = None ,
144144 role : typing .Optional [str ] = None
145145 ) -> typing .List [AXNode ]:
146- '''
146+ r '''
147147 Query a DOM node's accessibility subtree for accessible name and role.
148148 This command computes the name and role for all nodes in the subtree, including those that are
149149 ignored for accessibility, and returns those that mactch the specified name and role. If no DOM
0 commit comments