1# Native Accessibility
2
3## Overview
4
5Describes the APIs for third-party platforms to access the ArkUI accessibility framework through **XComponent**, that is, the APIs that third-party platforms need to implement, as well as related structs and enums.
6
7> **NOTE**
8>
9> The APIs of this module are supported since API version 13. Updates will be marked with a superscript to indicate their earliest API version.
10
11## Summary
12
13
14### Files
15
16| Name                                                        | Description                                                        |
17| ------------------------------------------------------------ | ------------------------------------------------------------ |
18| [native_interface_accessibility.h](native__interface__accessibility_8h.md) | Declares the APIs for accessing the native Accessibility.|
19
20### Types
21
22| Name                                                         | Description                                                  |
23| ------------------------------------------------------------ | ------------------------------------------------------------ |
24| [ArkUI_AccessibilityElementInfo](#arkui_accessibilityelementinfo) | Provides accessibility node information, which is used to transfer node information to accessibility services and applications. |
25| [ArkUI_AccessibilityElementInfoList](#arkui_accessibilityelementinfolist) | Defines an accessibility node list, which contains required accessibility node information. |
26| [ArkUI_AccessibilityEventInfo](#arkui_accessibilityeventinfo) | Provides accessibility event information. After a component completes an action requested by an accessibility service or application, it needs to send a success event to confirm the operation. Similarly, if the component needs to synchronize its state change with the accessibility service or application due to its own interactive behavior, it should actively trigger an event to communicate the change. |
27| [ArkUI_AccessibilityProvider](#arkui_accessibilityprovider)  | Defines a third-party accessibility provider, which carries callback function implementations. |
28| [ArkUI_AccessibilityProviderCallbacks](#arkui_accessibilityprovidercallbacks) | Defines a struct for third-party accessibility provider callback functions, which third-party platforms need to implement. These functions are registered with the system side through **OH_ArkUI_AccessibilityProviderRegisterCallback**. |
29| [ArkUI_AccessibilityActionArguments](#arkui_accessibilityactionarguments) | Provides additional information of the action to be executed. |
30| [ArkUI_AccessibleRect](#arkui_accessiblerect)                | Provides the coordinate position where the node is located.  |
31| [ArkUI_AccessibleRangeInfo](#arkui_accessiblerangeinfo)      | Sets the current value, maximum value, and minimum value in the component attributes. Used by specific components, such as **Slider**, **Rating**, and **Progress**. |
32| [ArkUI_AccessibleGridInfo](#arkui_accessiblegridinfo)        | Sets the number of rows, number of columns, and selection mode of the component. Used by specific components, such as **List**, **Flex**, **Select**, and **Swiper**. |
33| [ArkUI_AccessibleGridItemInfo](#arkui_accessiblegriditeminfo) | Sets the attribute values of component items. Used by specific components, such as **List**, **Flex**, **Select**, and **Swiper**. |
34| [ArkUI_AccessibleAction](#arkui_accessibleaction)            | Defines a struct for accessibility operation content.        |
35
36### Enums
37
38| Name                                                        | Description          |
39| ------------------------------------------------------------ | -------------- |
40| [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)    | Enumerates the error codes.      |
41| [ArkUI_AccessibilitySearchMode](#arkui_accessibilitysearchmode) | Enumerates the search modes.    |
42| [ArkUI_AccessibilityFocusType](#arkui_accessibilityfocustype) | Enumerates the focus types.    |
43| [ArkUI_Accessibility_ActionType](#arkui_accessibility_actiontype) | Enumerates the action types.    |
44| [ArkUI_AccessibilityEventType](#arkui_accessibilityeventtype) | Enumerates the event types.    |
45| [ArkUI_AccessibilityFocusMoveDirection](#arkui_accessibilityfocusmovedirection) | Enumerates the focus movement directions.|
46
47## Type Description
48
49### ArkUI_AccessibilityElementInfo
50
51```
52typedef struct ArkUI_AccessibilityElementInfo ArkUI_AccessibilityElementInfo
53```
54
55**Description**
56
57Provides accessibility node information, which is used to transfer node information to accessibility services and applications.
58
59**Since**
60
6113
62
63### ArkUI_AccessibilityElementInfoList
64
65```
66typedef struct ArkUI_AccessibilityElementInfoList ArkUI_AccessibilityElementInfoList
67```
68
69**Description**
70
71Defines an accessibility node list, which contains required accessibility node information.
72
73**Since**
74
7513
76
77### ArkUI_AccessibilityEventInfo
78
79```
80typedef struct ArkUI_AccessibilityEventInfo ArkUI_AccessibilityEventInfo
81```
82
83**Description**
84
85Provides accessibility event information. After a component completes an action requested by an accessibility service or application, it needs to send a success event to confirm the operation. Similarly, if the component needs to synchronize its state change with the accessibility service or application due to its own interactive behavior, it should actively trigger an event to communicate the change.
86
87**Since**
88
8913
90
91### ArkUI_AccessibilityProvider
92
93```
94typedef struct ArkUI_AccessibilityProvider ArkUI_AccessibilityProvider
95```
96
97**Description**
98
99Defines a third-party accessibility provider, which carries callback function implementations.
100
101**Since**
102
10313
104
105### ArkUI_AccessibilityProviderCallbacks
106
107```C
108typedef struct ArkUI_AccessibilityProviderCallbacks {
109    int32_t (*findAccessibilityNodeInfosById)(int64_t elementId, ArkUI_AccessibilitySearchMode mode, int32_t requestId, ArkUI_AccessibilityElementInfoList* elementList);
110    int32_t (*findAccessibilityNodeInfosByText)(int64_t elementId, const char* text, int32_t requestId, ArkUI_AccessibilityElementInfoList* elementList);
111    int32_t (*findFocusedAccessibilityNode)(int64_t elementId, ArkUI_AccessibilityFocusType focusType, int32_t requestId, ArkUI_AccessibilityElementInfo* elementinfo);
112    int32_t (*findNextFocusAccessibilityNode)(int64_t elementId, ArkUI_AccessibilityFocusMoveDirection direction, int32_t requestId, ArkUI_AccessibilityElementInfo* elementList);
113    int32_t (*executeAccessibilityAction)(int64_t elementId, ArkUI_Accessibility_ActionType action, ArkUI_AccessibilityActionArguments *actionArguments, int32_t requestId);
114    int32_t (*clearFocusedFocusAccessibilityNode)();
115    int32_t (*getAccessibilityNodeCursorPosition)(int64_t elementId, int32_t requestId, int32_t* index);
116} ArkUI_AccessibilityProviderCallbacks;
117```
118
119**Description**
120
121Defines a struct for third-party accessibility provider callback functions, which third-party platforms need to implement. These functions are registered with the system side through **OH_ArkUI_AccessibilityProviderRegisterCallback**.
122
123| Name                                                    | Description                            |
124| ------------------------------------------------------------ | ------------------------------------ |
125| [findAccessibilityNodeInfosById](#findaccessibilitynodeinfosbyid) | Finds the information about an accessibility node based on the specified node ID.|
126| [findAccessibilityNodeInfosByText](#findaccessibilitynodeinfosbytext) | Finds the nodes that contain specific text content.    |
127| [findFocusedAccessibilityNode](#findfocusedaccessibilitynode) | Finds the node that currently has focus within a given node.      |
128| [findNextFocusAccessibilityNode](#findnextfocusaccessibilitynode) | Finds the next node in a specified direction from a given node.      |
129| [executeAccessibilityAction](#executeaccessibilityaction)    | Performs a specified action on a specified node.|
130| [clearFocusedFocusAccessibilityNode](#clearfocusedfocusaccessibilitynode) | Removes focus from the current node.                |
131| [getAccessibilityNodeCursorPosition](#getaccessibilitynodecursorposition) | Obtains the cursor position within a text component of the current accessibility node.|
132
133**Since**
134
13513
136
137### ArkUI_AccessibilityActionArguments
138
139**Description**
140
141Provides additional information of the action to be executed.
142
143**Since**
144
14513
146
147
148
149### ArkUI_AccessibleRect
150
151**Description**
152
153Provides the coordinate position where the node is located.
154
155**Parameters**
156
157| Name        | Type | Description               |
158| ------------ | ----- | ------------------- |
159| leftTopX     | int32 | X coordinate of the upper left corner.|
160| leftTopY     | int32 | Y coordinate of the upper left corner.|
161| rightBottomX | int32 | X coordinate of the lower right corner.|
162| rightBottomY | int32 | Y coordinate of the lower right corner.|
163
164**Since**
165
16613
167
168
169
170### ArkUI_AccessibleRangeInfo
171
172**Description**
173
174Sets the current value, maximum value, and minimum value in the component attributes. Used by specific components, such as **Slider**, **Rating**, and **Progress**.
175
176**Parameters**
177
178| Name   | Type  | Description    |
179| ------- | ------ | -------- |
180| min     | double | Minimum value.|
181| max     | double | Maximum value.|
182| current | double | Current value.|
183
184**Since**
185
18613
187
188
189
190### ArkUI_AccessibleGridInfo
191
192**Description**
193
194Sets the number of rows, number of columns, and selection mode of the component. Used by specific components, such as **List**, **Flex**, **Select**, and **Swiper**.
195
196**Parameters**
197
198| Name         | Type | Description      |
199| ------------- | ----- | ---------- |
200| rowCount      | int32 | Number of columns.    |
201| columnCount   | int32 | Number of rows.    |
202| selectionMode | int32 | Selection mode.|
203
204**Since**
205
20613
207
208
209
210### ArkUI_AccessibleGridItemInfo
211
212**Description**
213
214Sets the attribute values of component items. Used by specific components, such as **List**, **Flex**, **Select**, and **Swiper**.
215
216**Parameters**
217
218| Name       | Type | Description        |
219| ----------- | ----- | ------------ |
220| heading     | bool  | Whether the item is a heading.|
221| selected    | bool  | Whether the item is selected.|
222| columnIndex | int32 | Column index of the item.    |
223| rowIndex    | int32 | Row index of the item.    |
224| columnSpan  | int32 | Number of columns that the item spans.    |
225| rowSpan     | int32 | Number of rows that the item spans.    |
226
227**Since**
228
22913
230
231### ArkUI_AccessibleAction
232
233**Description**
234
235Defines a struct for the accessibility action.
236
237**Parameters**
238
239| Name       | Type                                                        | Description            |
240| ----------- | ------------------------------------------------------------ | ---------------- |
241| actionType  | [ArkUI_Accessibility_ActionType](#arkui_accessibility_actiontype) | Accessibility action type.|
242| description | char*                                                        | Description.      |
243
244**Since**
245
24613
247
248## Function Description
249
250### findAccessibilityNodeInfosById
251
252```C
253int32_t (*findAccessibilityNodeInfosById)(int64_t elementId, ArkUI_AccessibilitySearchMode mode, int32_t requestId, ArkUI_AccessibilityElementInfoList* elementList);
254```
255
256**Description**
257
258Finds the information about an accessibility node based on the specified node ID. This function should be implemented by the third-party platform and registered for the system to call.
259
260**Since**: 13
261
262**Parameters**
263
264| Name       | Description                                                        |
265| ----------- | ------------------------------------------------------------ |
266| elementId   | ID of the node from which to start the search. If the value is **-1**, the search starts from the root node of the component tree.|
267| mode        | Search mode. The following are supported: [ArkUI_AccessibilitySearchMode](#arkui_accessibilitysearchmode).|
268| requestId   | Request ID, which is used to identify the request process and facilitate fault locating. It is recommended that third-party platforms include this ID in their key log outputs for debugging purposes.|
269| elementList | Search result, which the third-party platform returns based on the search.                    |
270
271**Returns**
272
273 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
274
275### findAccessibilityNodeInfosByText
276
277```C
278int32_t (*findAccessibilityNodeInfosByText)(int64_t elementId, const char* text, int32_t requestId, ArkUI_AccessibilityElementInfoList* elementList);
279```
280
281**Description**
282
283This function should be implemented by the third-party platform and registered for the system to call. Finds the nodes that contain specific text content.
284
285**Since**: 13
286
287**Parameters**
288
289| Name       | Description                                                        |
290| ----------- | ------------------------------------------------------------ |
291| elementId   | ID of the node from which to start the search. If the value is **-1**, the search starts from the root node of the component tree.|
292| text        | Text to match against the accessibility text content of the nodes.                  |
293| requestId   | Request ID, which is used to identify the request process and facilitate fault locating. It is recommended that third-party platforms include this ID in their key log outputs for debugging purposes.|
294| elementList | Search result, which the third-party platform returns based on the search.                    |
295
296**Returns**
297
298 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
299
300### findFocusedAccessibilityNode
301
302```C
303int32_t (*findFocusedAccessibilityNode)(int64_t elementId, ArkUI_AccessibilityFocusType focusType, int32_t requestId, ArkUI_AccessibilityElementInfo* elementinfo);
304```
305
306**Description**
307
308This function should be implemented by the third-party platform and registered for the system to call. Finds the node that currently has focus within a given node.
309
310**Since**: 13
311
312**Parameters**
313
314| Name       | Description                                                        |
315| ----------- | ------------------------------------------------------------ |
316| elementId   | ID of the node from which to start the search. If the value is **-1**, the search starts from the root node of the component tree.|
317| focusType   | Type of accessibility focus, as defined in [ArkUI_AccessibilityFocusType](#arkui_accessibilityfocustype).|
318| requestId   | Request ID, which is used to identify the request process and facilitate fault locating. It is recommended that third-party platforms include this ID in their key log outputs for debugging purposes.|
319| elementList | Search result, which the third-party platform returns based on the search.                    |
320
321**Returns**
322
323 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
324
325
326
327### findNextFocusAccessibilityNode
328
329```C
330int32_t (*findNextFocusAccessibilityNode)(int64_t elementId, ArkUI_AccessibilityFocusMoveDirection direction, int32_t requestId, ArkUI_AccessibilityElementInfo* elementList);
331```
332
333**Description**
334
335This function should be implemented by the third-party platform and registered for the system to call. Finds the next node in a specified direction from a given node.
336
337**Since**: 13
338
339**Parameters**
340
341| Name       | Description                                                        |
342| ----------- | ------------------------------------------------------------ |
343| elementId   | ID of the node from which to start the search. If the value is **-1**, the search starts from the root node of the component tree.|
344| focusType   | Type of accessibility focus, as defined in [ArkUI_AccessibilityFocusType](#arkui_accessibilityfocustype).|
345| requestId   | Request ID, which is used to identify the request process and facilitate fault locating. It is recommended that third-party platforms include this ID in their key log outputs for debugging purposes.|
346| elementList | Search result, which the third-party platform returns based on the search.                    |
347
348**Returns**
349
350 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
351
352### executeAccessibilityAction
353
354```C
355int32_t (*executeAccessibilityAction)(int64_t elementId, ArkUI_Accessibility_ActionType action, ArkUI_AccessibilityActionArguments *actionArguments, int32_t requestId);
356```
357
358**Description**
359
360This function should be implemented by the third-party platform and registered for the system to call. Performs a specified action on a specified node.
361
362**Since**: 13
363
364**Parameters**
365
366| Name           | Description                                                        |
367| --------------- | ------------------------------------------------------------ |
368| elementId       | ID of the specified node.                                              |
369| action          | Type of action to be performed, as defined in [ArkUI_Accessibility_ActionType](#arkui_accessibility_actiontype).|
370| requestId       | Request ID, which is used to identify the request process and facilitate fault locating. It is recommended that third-party platforms include this ID in their key log outputs for debugging purposes.|
371| actionArguments | Additional information of the action.                                        |
372
373**Returns**
374
375 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
376
377### clearFocusedFocusAccessibilityNode
378
379```C
380int32_t (*clearFocusedFocusAccessibilityNode)();
381```
382
383**Description**
384
385This function should be implemented by the third-party platform and registered for the system to call. Removes focus from this node.
386
387**Since**: 13
388
389**Input parameter**: none
390
391**Returns**
392
393 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
394
395### getAccessibilityNodeCursorPosition
396
397```C
398int32_t (*getAccessibilityNodeCursorPosition)(int64_t elementId, int32_t requestId, int32_t* index);
399```
400
401**Description**
402
403This function should be implemented by the third-party platform and registered for the system to call. Obtains the cursor position within a text component of the current accessibility node.
404
405**Since**: 13
406
407**Parameters**
408
409| Name     | Description                                                        |
410| --------- | ------------------------------------------------------------ |
411| elementId | ID of the specified node.                                              |
412| requestId | Request ID, which is used to identify the request process and facilitate fault locating. It is recommended that third-party platforms include this ID in their key log outputs for debugging purposes.|
413| index     | Parameter where the cursor position result is returned.                                          |
414
415**Returns**
416
417 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
418
419
420
421### OH_ArkUI_AccessibilityProviderRegisterCallback
422
423```C
424int32_t OH_ArkUI_AccessibilityProviderRegisterCallback(
425    ArkUI_AccessibilityProvider* provider, ArkUI_AccessibilityProviderCallbacks* callbacks);
426```
427
428**Description**
429
430Registers callback functions.
431
432**Since**: 13
433
434**Parameters**
435
436| Name     | Description                      |
437| --------- | -------------------------- |
438| provider  | Handle to the provider of the third-party platform.|
439| callbacks | Implementation of the callback functions.            |
440
441**Returns**
442
443 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
444
445
446
447### OH_ArkUI_SendAccessibilityAsyncEvent
448
449```C
450void OH_ArkUI_SendAccessibilityAsyncEvent(
451    ArkUI_AccessibilityProvider* provider, ArkUI_AccessibilityEventInfo* eventInfo, void (*callback)(int32_t errorCode));
452```
453
454**Description**
455
456Proactively sends an event to notify the accessibility service.
457
458**Since**: 13
459
460**Parameters**
461
462| Name     | Description                      |
463| --------- | -------------------------- |
464| provider  | Handle to the provider of the third-party platform.|
465| eventInfo | Event to send.                |
466| callback  | Callback for the returned result.            |
467
468**Returns**: none
469
470
471
472### OH_ArkUI_CreateAccessibilityElementInfo
473
474```C
475ArkUI_AccessibilityElementInfo* OH_ArkUI_CreateAccessibilityElementInfo(void);
476```
477
478**Description**
479
480Creates an **ArkUI_AccessibilityElementInfo** struct. After creation, you must call [OH_ArkUI_DestoryAccessibilityElementInfo](#oh_arkui_destoryaccessibilityelementinfo) to release it.
481
482**Since**: 13
483
484**Returns**
485
486Returns the pointer to the created **ArkUI_AccessibilityElementInfo** struct; returns **NULL** if creation fails.
487
488### OH_ArkUI_DestoryAccessibilityElementInfo
489
490```C
491void OH_ArkUI_DestoryAccessibilityElementInfo(ArkUI_AccessibilityElementInfo* elementInfo);
492```
493
494**Description**
495
496Destroys an **ArkUI_AccessibilityElementInfo** struct.
497
498**Since**: 13
499
500**Parameters**
501
502| Name       | Description                           |
503| ----------- | ------------------------------- |
504| elementInfo | Pointer to the **ArkUI_AccessibilityElementInfo** struct to be destroyed.|
505
506**Returns**: none
507
508
509
510### OH_ArkUI_AddAndGetAccessibilityElementInfo
511
512```C
513ArkUI_AccessibilityElementInfo* OH_ArkUI_AddAndGetAccessibilityElementInfo(ArkUI_AccessibilityElementInfoList* list);
514```
515
516**Description**
517
518Adds an **ArkUI_AccessibilityElementInfo** member to the specified list and returns the **ArkUI_AccessibilityElementInfo** struct.
519
520**Since**: 13
521
522**Parameters**
523
524| Name| Description                                                        |
525| ---- | ------------------------------------------------------------ |
526| list | **ArkUI_AccessibilityElementInfoList** struct to which the new **ArkUI_AccessibilityElementInfo** member is added and then returned to the function caller.|
527
528**Returns**
529
530Returns the pointer to the **ArkUI_AccessibilityElementInfo** struct; returns **NULL** if the operation fails.
531
532
533
534### OH_ArkUI_AccessibilityElementInfoSetElementId
535
536```C
537int32_t OH_ArkUI_AccessibilityElementInfoSetElementId(ArkUI_AccessibilityElementInfo* elementInfo, int32_t elementId);
538```
539
540**Description**
541
542Sets the ID for an **ArkUI_AccessibilityElementInfo** struct.
543
544**Since**: 13
545
546**Parameters**
547
548| Name       | Description         |
549| ----------- | ------------- |
550| elementInfo | Pointer to an **ArkUI_AccessibilityElementInfo** struct.|
551| elementId   | ID to set. |
552
553**Returns**
554
555 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
556
557
558
559### OH_ArkUI_AccessibilityElementInfoSetParentId
560
561```C
562int32_t OH_ArkUI_AccessibilityElementInfoSetParentId(ArkUI_AccessibilityElementInfo* elementInfo, int32_t parentId);
563```
564
565**Description**
566
567Sets the parent ID for an **ArkUI_AccessibilityElementInfo** struct.
568
569**Since**: 13
570
571**Parameters**
572
573| Name       | Description          |
574| ----------- | -------------- |
575| elementInfo | Pointer to an **ArkUI_AccessibilityElementInfo** struct. |
576| parentId    | Parent ID to set.|
577
578**Returns**
579
580 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
581
582
583
584### OH_ArkUI_AccessibilityElementInfoSetComponentType
585
586```C
587int32_t OH_ArkUI_AccessibilityElementInfoSetComponentType(ArkUI_AccessibilityElementInfo* elementInfo, const char* componentType);
588```
589
590**Description**
591
592Sets the component type for an **ArkUI_AccessibilityElementInfo** struct.
593
594**Since**: 13
595
596**Parameters**
597
598| Name         | Description          |
599| ------------- | -------------- |
600| elementInfo   | Pointer to an **ArkUI_AccessibilityElementInfo** struct. |
601| componentType | Component type to set.|
602
603**Returns**
604
605 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
606
607
608
609### OH_ArkUI_AccessibilityElementInfoSetContents
610
611```c
612int32_t OH_ArkUI_AccessibilityElementInfoSetContents(ArkUI_AccessibilityElementInfo* elementInfo, const char* contents);
613```
614
615**Description**
616
617Sets the component content for an **ArkUI_AccessibilityElementInfo** struct.
618
619**Since**: 13
620
621**Parameters**
622
623| Name       | Description          |
624| ----------- | -------------- |
625| elementInfo | Pointer to an **ArkUI_AccessibilityElementInfo** struct. |
626| contents    | Component content to set.|
627
628**Returns**
629
630 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
631
632
633
634### OH_ArkUI_AccessibilityElementInfoSetHintText
635
636```C
637int32_t OH_ArkUI_AccessibilityElementInfoSetHintText(ArkUI_AccessibilityElementInfo* elementInfo, const char* hintText);
638```
639
640**Description**
641
642Sets the hint text for an **ArkUI_AccessibilityElementInfo** struct.
643
644**Since**: 13
645
646**Parameters**
647
648| Name       | Description         |
649| ----------- | ------------- |
650| elementInfo | Pointer to an **ArkUI_AccessibilityElementInfo** struct.|
651| hintText    | Hint text to set.   |
652
653**Returns**
654
655 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
656
657
658
659### OH_ArkUI_AccessibilityElementInfoSetAccessibilityText
660
661```C
662int32_t OH_ArkUI_AccessibilityElementInfoSetAccessibilityText(ArkUI_AccessibilityElementInfo* elementInfo, const char* accessibilityText);
663```
664
665**Description**
666
667Sets the accessibility text for an **ArkUI_AccessibilityElementInfo** struct.
668
669**Since**: 13
670
671**Parameters**
672
673| Name             | Description                  |
674| ----------------- | ---------------------- |
675| elementInfo       | Pointer to an **ArkUI_AccessibilityElementInfo** struct.         |
676| accessibilityText | Accessibility text to set.|
677
678**Returns**
679
680 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
681
682
683
684### OH_ArkUI_AccessibilityElementInfoSetAccessibilityDescription
685
686```C
687int32_t OH_ArkUI_AccessibilityElementInfoSetAccessibilityDescription(ArkUI_AccessibilityElementInfo* elementInfo, const char* accessibilityDescription);
688```
689
690**Description**
691
692Sets the accessibility description for an **ArkUI_AccessibilityElementInfo** struct.
693
694**Since**: 13
695
696**Parameters**
697
698| Name                    | Description            |
699| ------------------------ | ---------------- |
700| elementInfo              | Pointer to an **ArkUI_AccessibilityElementInfo** struct.   |
701| accessibilityDescription | Accessibility description to set.|
702
703**Returns**
704
705 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
706
707
708
709### OH_ArkUI_AccessibilityElementInfoSetChildNodeIds
710
711```C
712int32_t OH_ArkUI_AccessibilityElementInfoSetChildNodeIds(ArkUI_AccessibilityElementInfo* elementInfo, int32_t childCount, int64_t* childNodeIds);
713```
714
715**Description**
716
717Sets the number of child nodes and child node IDs for an **ArkUI_AccessibilityElementInfo** struct.
718
719**Since**: 13
720
721**Parameters**
722
723| Name        | Description          |
724| ------------ | -------------- |
725| elementInfo  | Pointer to an **ArkUI_AccessibilityElementInfo** struct. |
726| childCount   | Number of child nodes.  |
727| childNodeIds | Array of child node IDs.|
728
729**Returns**
730
731 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
732
733
734
735### OH_ArkUI_AccessibilityElementInfoSetOperationActions
736
737```C
738int32_t OH_ArkUI_AccessibilityElementInfoSetOperationActions(ArkUI_AccessibilityElementInfo* elementInfo, int32_t operationCount, ArkUI_AccessibleAction* operationActions);
739```
740
741**Description**
742
743Sets the number of actions and the actions themselves for an **ArkUI_AccessibilityElementInfo** struct.
744
745**Since**: 13
746
747**Parameters**
748
749| Name            | Description                  |
750| ---------------- | ---------------------- |
751| elementInfo      | Pointer to an **ArkUI_AccessibilityElementInfo** struct.         |
752| operationCount   | Number of actions supported by the component.|
753| operationActions | Array of actions supported by the component.    |
754
755**Returns**
756
757 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
758
759
760
761### OH_ArkUI_AccessibilityElementInfoSetScreenRect
762
763```C
764int32_t OH_ArkUI_AccessibilityElementInfoSetScreenRect(ArkUI_AccessibilityElementInfo* elementInfo, ArkUI_AccessibleRect* screenRect);
765```
766
767**Description**
768
769Sets the screen rectangle for an **ArkUI_AccessibilityElementInfo** struct.
770
771**Since**: 13
772
773**Parameters**
774
775| Name            | Description              |
776| ---------------- | ------------------ |
777| elementInfo      | Pointer to an **ArkUI_AccessibilityElementInfo** struct.     |
778| screenRect       | Screen rectangle to set.    |
779
780**Returns**
781
782 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
783
784
785
786### OH_ArkUI_AccessibilityElementInfoSetCheckable
787
788```C
789int32_t OH_ArkUI_AccessibilityElementInfoSetCheckable(ArkUI_AccessibilityElementInfo* elementInfo, bool checkable);
790```
791
792**Description**
793
794Sets whether an **ArkUI_AccessibilityElementInfo** struct is checkable.
795
796**Since**: 13
797
798**Parameters**
799
800| Name       | Description          |
801| ----------- | -------------- |
802| elementInfo | Pointer to an **ArkUI_AccessibilityElementInfo** struct. |
803| checkable   | Whether the element is checkable.|
804
805**Returns**
806
807 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
808
809
810
811### OH_ArkUI_AccessibilityElementInfoSetChecked
812
813```C
814int32_t OH_ArkUI_AccessibilityElementInfoSetChecked(ArkUI_AccessibilityElementInfo* elementInfo, bool checked);
815```
816
817**Description**
818
819Sets whether an **ArkUI_AccessibilityElementInfo** struct is checked.
820
821**Since**: 13
822
823**Parameters**
824
825| Name       | Description            |
826| ----------- | ---------------- |
827| elementInfo | Pointer to an **ArkUI_AccessibilityElementInfo** struct.   |
828| checked     | Whether the element is checked.|
829
830**Returns**
831
832 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
833
834
835
836### OH_ArkUI_AccessibilityElementInfoSetFocusable
837
838```C
839int32_t OH_ArkUI_AccessibilityElementInfoSetFocusable(ArkUI_AccessibilityElementInfo* elementInfo, bool focusable);
840```
841
842**Description**
843
844Sets whether an **ArkUI_AccessibilityElementInfo** struct is focusable.
845
846**Since**: 13
847
848**Parameters**
849
850| Name       | Description            |
851| ----------- | ---------------- |
852| elementInfo | Pointer to an **ArkUI_AccessibilityElementInfo** struct.   |
853| focusable   | Whether the element is focusable.|
854
855**Returns**
856
857 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
858
859
860
861### OH_ArkUI_AccessibilityElementInfoSetFocused
862
863```C
864int32_t OH_ArkUI_AccessibilityElementInfoSetFocused(ArkUI_AccessibilityElementInfo* elementInfo, bool isFocused);
865```
866
867**Description**
868
869Sets whether an **ArkUI_AccessibilityElementInfo** struct is focused.
870
871**Since**: 13
872
873**Parameters**
874
875| Name       | Description          |
876| ----------- | -------------- |
877| elementInfo | Pointer to an **ArkUI_AccessibilityElementInfo** struct. |
878| isFocused   | Whether the element is focused.|
879
880**Returns**
881
882 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
883
884
885
886### OH_ArkUI_AccessibilityElementInfoSetVisible
887
888```C
889int32_t OH_ArkUI_AccessibilityElementInfoSetVisible(ArkUI_AccessibilityElementInfo* elementInfo, bool isVisible);
890```
891
892**Description**
893
894Sets whether an **ArkUI_AccessibilityElementInfo** struct is visible.
895
896**Since**: 13
897
898**Parameters**
899
900| Name       | Description          |
901| ----------- | -------------- |
902| elementInfo | Pointer to an **ArkUI_AccessibilityElementInfo** struct. |
903| isVisible   | Whether the element is visible.|
904
905**Returns**
906
907 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
908
909
910
911### OH_ArkUI_AccessibilityElementInfoSetAccessibilityFocused
912
913```C
914int32_t OH_ArkUI_AccessibilityElementInfoSetAccessibilityFocused(ArkUI_AccessibilityElementInfo* elementInfo, bool accessibilityFocused);
915```
916
917**Description**
918
919Sets whether an **ArkUI_AccessibilityElementInfo** struct is focused for accessibility purposes.
920
921**Since**: 13
922
923**Parameters**
924
925| Name                | Description            |
926| -------------------- | ---------------- |
927| elementInfo          | Pointer to an **ArkUI_AccessibilityElementInfo** struct.   |
928| accessibilityFocused | Whether the element is focused for accessibility purposes.|
929
930**Returns**
931
932 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
933
934
935
936### OH_ArkUI_AccessibilityElementInfoSetSelected
937
938```C
939int32_t OH_ArkUI_AccessibilityElementInfoSetSelected(ArkUI_AccessibilityElementInfo* elementInfo, bool selected);
940```
941
942**Description**
943
944Sets whether an **ArkUI_AccessibilityElementInfo** struct is selected.
945
946**Since**: 13
947
948**Parameters**
949
950| Name       | Description            |
951| ----------- | ---------------- |
952| elementInfo | Pointer to an **ArkUI_AccessibilityElementInfo** struct.   |
953| selected    | Whether the element is selected.|
954
955**Returns**
956
957 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
958
959
960
961### OH_ArkUI_AccessibilityElementInfoSetClickable
962
963```C
964int32_t OH_ArkUI_AccessibilityElementInfoSetClickable(ArkUI_AccessibilityElementInfo* elementInfo, bool clickable);
965```
966
967**Description**
968
969Sets whether an **ArkUI_AccessibilityElementInfo** struct is clickable.
970
971**Since**: 13
972
973**Parameters**
974
975| Name       | Description            |
976| ----------- | ---------------- |
977| elementInfo | Pointer to an **ArkUI_AccessibilityElementInfo** struct.   |
978| clickable   | Whether the element is clickable.|
979
980**Returns**
981
982 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
983
984
985
986### OH_ArkUI_AccessibilityElementInfoSetLongClickable
987
988```C
989int32_t OH_ArkUI_AccessibilityElementInfoSetLongClickable(ArkUI_AccessibilityElementInfo* elementInfo, bool longClickable);
990```
991
992**Description**
993
994Sets whether an **ArkUI_AccessibilityElementInfo** struct is long-clickable.
995
996**Since**: 13
997
998**Parameters**
999
1000| Name         | Description              |
1001| ------------- | ------------------ |
1002| elementInfo   | Pointer to an **ArkUI_AccessibilityElementInfo** struct.     |
1003| longClickable | Whether the element is long-clickable.|
1004
1005**Returns**
1006
1007 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
1008
1009
1010
1011### OH_ArkUI_AccessibilityElementInfoSetEnabled
1012
1013```C
1014int32_t OH_ArkUI_AccessibilityElementInfoSetEnabled(ArkUI_AccessibilityElementInfo* elementInfo, bool isEnabled);
1015```
1016
1017**Description**
1018
1019Sets whether an **ArkUI_AccessibilityElementInfo** struct is enabled.
1020
1021**Since**: 13
1022
1023**Parameters**
1024
1025| Name       | Description          |
1026| ----------- | -------------- |
1027| elementInfo | Pointer to an **ArkUI_AccessibilityElementInfo** struct. |
1028| isEnabled   | Whether the element is enabled.|
1029
1030**Returns**
1031
1032 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
1033
1034
1035
1036### OH_ArkUI_AccessibilityElementInfoSetIsPassword
1037
1038```C
1039int32_t OH_ArkUI_AccessibilityElementInfoSetIsPassword(ArkUI_AccessibilityElementInfo* elementInfo, bool isPassword);
1040```
1041
1042**Description**
1043
1044Sets whether an **ArkUI_AccessibilityElementInfo** struct is a password.
1045
1046**Since**: 13
1047
1048**Parameters**
1049
1050| Name       | Description            |
1051| ----------- | ---------------- |
1052| elementInfo | Pointer to an **ArkUI_AccessibilityElementInfo** struct.   |
1053| isPassword  | Whether the element is a password.|
1054
1055**Returns**
1056
1057 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
1058
1059
1060
1061### OH_ArkUI_AccessibilityElementInfoSetScrollable
1062
1063```C
1064int32_t OH_ArkUI_AccessibilityElementInfoSetScrollable(ArkUI_AccessibilityElementInfo* elementInfo, bool scrollable);
1065```
1066
1067**Description**
1068
1069Sets whether an **ArkUI_AccessibilityElementInfo** struct is scrollable.
1070
1071**Since**: 13
1072
1073**Parameters**
1074
1075| Name       | Description            |
1076| ----------- | ---------------- |
1077| elementInfo | Pointer to an **ArkUI_AccessibilityElementInfo** struct.   |
1078| scrollable  | Whether the element is scrollable.|
1079
1080**Returns**
1081
1082 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
1083
1084
1085
1086### OH_ArkUI_AccessibilityElementInfoSetEditable
1087
1088```C
1089int32_t OH_ArkUI_AccessibilityElementInfoSetEditable(ArkUI_AccessibilityElementInfo* elementInfo, bool editable);
1090```
1091
1092**Description**
1093
1094Sets whether an **ArkUI_AccessibilityElementInfo** struct is editable.
1095
1096**Since**: 13
1097
1098**Parameters**
1099
1100| Name       | Description            |
1101| ----------- | ---------------- |
1102| elementInfo | Pointer to an **ArkUI_AccessibilityElementInfo** struct.   |
1103| editable    | Whether the element is editable.|
1104
1105**Returns**
1106
1107 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
1108
1109
1110
1111### OH_ArkUI_AccessibilityElementInfoSetIsHint
1112
1113```C
1114int32_t OH_ArkUI_AccessibilityElementInfoSetIsHint(ArkUI_AccessibilityElementInfo* elementInfo, bool isHint);
1115```
1116
1117**Description**
1118
1119Sets whether an **ArkUI_AccessibilityElementInfo** struct is a hint.
1120
1121**Since**: 13
1122
1123**Parameters**
1124
1125| Name       | Description                |
1126| ----------- | -------------------- |
1127| elementInfo | Pointer to an **ArkUI_AccessibilityElementInfo** struct.       |
1128| isHint      | Whether the element is a hint.|
1129
1130**Returns**
1131
1132 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
1133
1134
1135
1136### OH_ArkUI_AccessibilityElementInfoSetRangeInfo
1137
1138```C
1139int32_t OH_ArkUI_AccessibilityElementInfoSetRangeInfo(ArkUI_AccessibilityElementInfo* elementInfo, ArkUI_AccessibleRangeInfo* rangeInfo);
1140```
1141
1142**Description**
1143
1144Sets the range information for an **ArkUI_AccessibilityElementInfo** struct.
1145
1146**Since**: 13
1147
1148**Parameters**
1149
1150| Name       | Description                                                        |
1151| ----------- | ------------------------------------------------------------ |
1152| elementInfo | Pointer to an **ArkUI_AccessibilityElementInfo** struct.                                               |
1153| rangeInfo   | Current value, maximum value, and minimum value of the component attributes. Used by specific components, such as **Slider**, **Rating**, and **Progress**. |
1154
1155**Returns**
1156
1157 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
1158
1159
1160
1161### OH_ArkUI_AccessibilityElementInfoSetGridInfo
1162
1163```C
1164int32_t OH_ArkUI_AccessibilityElementInfoSetGridInfo(ArkUI_AccessibilityElementInfo* elementInfo, ArkUI_AccessibleGridInfo* gridInfo);
1165```
1166
1167**Description**
1168
1169Sets the grid information for an **ArkUI_AccessibilityElementInfo** struct.
1170
1171**Since**: 13
1172
1173**Parameters**
1174
1175| Name       | Description                                                        |
1176| ----------- | ------------------------------------------------------------ |
1177| elementInfo | Pointer to an **ArkUI_AccessibilityElementInfo** struct.                                               |
1178| gridInfo    | Number of rows, number of columns, and selection mode. Used by specific components, such as **List**, **Flex**, **Select**, and **Swiper**. |
1179
1180**Returns**
1181
1182 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
1183
1184
1185
1186### OH_ArkUI_AccessibilityElementInfoSetGridItemInfo
1187
1188```C
1189int32_t OH_ArkUI_AccessibilityElementInfoSetGridItemInfo(ArkUI_AccessibilityElementInfo* elementInfo, ArkUI_AccessibleGridItemInfo* gridItem);
1190```
1191
1192**Description**
1193
1194Sets the grid item information for an **ArkUI_AccessibilityElementInfo** struct.
1195
1196**Since**: 13
1197
1198**Parameters**
1199
1200| Name       | Description                                                |
1201| ----------- | ---------------------------------------------------- |
1202| elementInfo | Pointer to an **ArkUI_AccessibilityElementInfo** struct.                                       |
1203| gridItem    | Grid item to set. Used by specific components, such as **List**, **Flex**, **Select**, and **Swiper**.|
1204
1205**Returns**
1206
1207 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
1208
1209
1210
1211### OH_ArkUI_AccessibilityElementInfoSetSelectedTextStart
1212
1213```
1214int32_t OH_ArkUI_AccessibilityElementInfoSetSelectedTextStart(ArkUI_AccessibilityElementInfo* elementInfo, int32_t selectedTextStart);
1215```
1216
1217**Description**
1218
1219Sets the start position of the selected text for an **ArkUI_AccessibilityElementInfo** struct.
1220
1221**Since**: 13
1222
1223**Parameters**
1224
1225| Name             | Description                              |
1226| ----------------- | ---------------------------------- |
1227| elementInfo       | Pointer to an **ArkUI_AccessibilityElementInfo** struct.                     |
1228| selectedTextStart | Start position of the selected text. Used by text components.|
1229
1230**Returns**
1231
1232 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
1233
1234
1235
1236### OH_ArkUI_AccessibilityElementInfoSetSelectedTextEnd
1237
1238```C
1239int32_t OH_ArkUI_AccessibilityElementInfoSetSelectedTextEnd(ArkUI_AccessibilityElementInfo* elementInfo, int32_t selectedTextEnd);
1240```
1241
1242**Description**
1243
1244Sets the end position of the selected text for an **ArkUI_AccessibilityElementInfo** struct.
1245
1246**Since**: 13
1247
1248**Parameters**
1249
1250| Name           | Description                              |
1251| --------------- | ---------------------------------- |
1252| elementInfo     | Pointer to an **ArkUI_AccessibilityElementInfo** struct.                     |
1253| selectedTextEnd | End position of the selected text. Used by text components.|
1254
1255**Returns**
1256
1257 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
1258
1259
1260
1261### OH_ArkUI_AccessibilityElementInfoSetCurrentItemIndex
1262
1263```C
1264int32_t OH_ArkUI_AccessibilityElementInfoSetCurrentItemIndex(ArkUI_AccessibilityElementInfo* elementInfo, int32_t currentItemIndex);
1265```
1266
1267**Description**
1268
1269Sets the index of the currently focused item for an **ArkUI_AccessibilityElementInfo** struct.
1270
1271**Since**: 13
1272
1273**Parameters**
1274
1275| Name            | Description                                                        |
1276| ---------------- | ------------------------------------------------------------ |
1277| elementInfo      | Pointer to an **ArkUI_AccessibilityElementInfo** struct.                                               |
1278| currentItemIndex | Index of the currently focused item. Used by specific components, such as **List**, **Select**, **Swiper**, and **TabContent**.|
1279
1280**Returns**
1281
1282 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
1283
1284
1285
1286### OH_ArkUI_AccessibilityElementInfoSetStartItemIndex
1287
1288```C
1289int32_t OH_ArkUI_AccessibilityElementInfoSetStartItemIndex(ArkUI_AccessibilityElementInfo* elementInfo, int32_t startItemIndex);
1290```
1291
1292**Description**
1293
1294Sets the index of the first item displayed on the screen for an **ArkUI_AccessibilityElementInfo** struct.
1295
1296**Since**: 13
1297
1298**Parameters**
1299
1300| Name          | Description                                                        |
1301| -------------- | ------------------------------------------------------------ |
1302| elementInfo    | Pointer to an **ArkUI_AccessibilityElementInfo** struct.                                               |
1303| startItemIndex | Index of the first item displayed on the screen, that is, the index of the first visible component. Used by specific components, such as **List**, **Select**, **Swiper**, and **TabContent**.|
1304
1305**Returns**
1306
1307 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
1308
1309
1310
1311### OH_ArkUI_AccessibilityElementInfoSetEndItemIndex
1312
1313```C
1314int32_t OH_ArkUI_AccessibilityElementInfoSetEndItemIndex(
1315    ArkUI_AccessibilityElementInfo* elementInfo, int32_t endItemIndex);
1316```
1317
1318**Description**
1319
1320Sets the index of the last item displayed on the screen for an **ArkUI_AccessibilityElementInfo** struct.
1321
1322**Since**: 13
1323
1324**Parameters**
1325
1326| Name        | Description                                                        |
1327| ------------ | ------------------------------------------------------------ |
1328| elementInfo  | Pointer to an **ArkUI_AccessibilityElementInfo** struct.                                               |
1329| endItemIndex | Index of the first item displayed on the screen, that is, the index of the last visible component. Used by specific components, such as **List**, **Select**, **Swiper**, and **TabContent**.|
1330
1331**Returns**
1332
1333 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
1334
1335
1336
1337### OH_ArkUI_AccessibilityElementInfoSetItemCount
1338
1339```C
1340int32_t OH_ArkUI_AccessibilityElementInfoSetItemCount(
1341    ArkUI_AccessibilityElementInfo* elementInfo, int32_t itemCount);
1342```
1343
1344**Description**
1345
1346Sets the total number of items for an **ArkUI_AccessibilityElementInfo** struct.
1347
1348**Since**: 13
1349
1350**Parameters**
1351
1352| Name       | Description                                                     |
1353| ----------- | --------------------------------------------------------- |
1354| elementInfo | Pointer to an **ArkUI_AccessibilityElementInfo** struct.                                            |
1355| itemCount   | Total number of items. Used by specific components, such as **List**, **Select**, **Swiper**, and **TabContent**.|
1356
1357**Returns**
1358
1359 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
1360
1361
1362
1363### OH_ArkUI_AccessibilityElementInfoSetAccessibilityOffset
1364
1365```C
1366int32_t OH_ArkUI_AccessibilityElementInfoSetAccessibilityOffset(
1367    ArkUI_AccessibilityElementInfo* elementInfo, int32_t offset);
1368```
1369
1370**Description**
1371
1372Sets the offset for an **ArkUI_AccessibilityElementInfo** struct.
1373
1374**Since**: 13
1375
1376**Parameters**
1377
1378| Name       | Description                                                        |
1379| ----------- | ------------------------------------------------------------ |
1380| elementInfo | Pointer to an **ArkUI_AccessibilityElementInfo** struct.                                               |
1381| offset      | Pixel offset of the content area relative to the top coordinate of a scrollable component, such as **List** and **Grid**.|
1382
1383**Returns**
1384
1385 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
1386
1387
1388
1389### OH_ArkUI_AccessibilityElementInfoSetAccessibilityGroup
1390
1391```C
1392int32_t OH_ArkUI_AccessibilityElementInfoSetAccessibilityGroup(
1393    ArkUI_AccessibilityElementInfo* elementInfo, bool accessibilityGroup);
1394```
1395
1396**Description**
1397
1398Sets the accessibility group for an **ArkUI_AccessibilityElementInfo** struct.
1399
1400**Since**: 13
1401
1402**Parameters**
1403
1404| Name              | Description                                                        |
1405| ------------------ | ------------------------------------------------------------ |
1406| elementInfo        | Pointer to an **ArkUI_AccessibilityElementInfo** struct.                                               |
1407| accessibilityGroup | Accessibility group. If this attribute is set to **true**, the component and all its child components form an entire selectable component, and the accessibility service will no longer be available for the content of its child components.|
1408
1409**Returns**
1410
1411 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
1412
1413
1414
1415### OH_ArkUI_AccessibilityElementInfoSetAccessibilityLevel
1416
1417```C
1418int32_t OH_ArkUI_AccessibilityElementInfoSetAccessibilityLevel(
1419    ArkUI_AccessibilityElementInfo* elementInfo, const char* accessibilityLevel);
1420```
1421
1422**Description**
1423
1424Sets the accessibility level for an **ArkUI_AccessibilityElementInfo** struct.
1425
1426**Since**: 13
1427
1428**Parameters**
1429
1430| Name              | Description                                                        |
1431| ------------------ | ------------------------------------------------------------ |
1432| elementInfo        | Pointer to an **ArkUI_AccessibilityElementInfo** struct.                                               |
1433| accessibilityLevel | Accessibility level, which is used to decide whether a component can be identified by the accessibility service.|
1434
1435**Returns**
1436
1437 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
1438
1439
1440
1441### OH_ArkUI_AccessibilityElementInfoSetZIndex
1442
1443```C
1444int32_t OH_ArkUI_AccessibilityElementInfoSetZIndex(
1445    ArkUI_AccessibilityElementInfo* elementInfo, int32_t zIndex);
1446```
1447
1448**Description**
1449
1450Sets the z-index for an **ArkUI_AccessibilityElementInfo** struct.
1451
1452**Since**: 13
1453
1454**Parameters**
1455
1456| Name       | Description                                            |
1457| ----------- | ------------------------------------------------ |
1458| elementInfo | Pointer to an **ArkUI_AccessibilityElementInfo** struct.                                   |
1459| zIndex      | Z-order of the component, used to control the position of the component along the z-axis perpendicular to the screen.|
1460
1461**Returns**
1462
1463 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
1464
1465
1466
1467### OH_ArkUI_AccessibilityElementInfoSetAccessibilityOpacity
1468
1469```C
1470int32_t OH_ArkUI_AccessibilityElementInfoSetAccessibilityOpacity(
1471    ArkUI_AccessibilityElementInfo* elementInfo, float opacity);
1472```
1473
1474**Description**
1475
1476Sets the opacity for an **ArkUI_AccessibilityElementInfo** struct.
1477
1478**Since**: 13
1479
1480**Parameters**
1481
1482| Name       | Description                                                        |
1483| ----------- | ------------------------------------------------------------ |
1484| elementInfo | Pointer to an **ArkUI_AccessibilityElementInfo** struct.                                               |
1485| opacity     | Opacity of the component. The value ranges from 0 to 1. The value **1** means opaque, and **0** means completely transparent. |
1486
1487**Returns**
1488
1489 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
1490
1491
1492
1493### OH_ArkUI_AccessibilityElementInfoSetBackgroundColor
1494
1495```C
1496int32_t OH_ArkUI_AccessibilityElementInfoSetBackgroundColor(
1497    ArkUI_AccessibilityElementInfo* elementInfo, const char* backgroundColor);
1498```
1499
1500**Description**
1501
1502Sets the background color for an **ArkUI_AccessibilityElementInfo** struct.
1503
1504**Since**: 13
1505
1506**Parameters**
1507
1508| Name           | Description            |
1509| --------------- | ---------------- |
1510| elementInfo     | Pointer to an **ArkUI_AccessibilityElementInfo** struct.   |
1511| backgroundColor | Background color of the component.|
1512
1513**Returns**
1514
1515 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
1516
1517
1518
1519### OH_ArkUI_AccessibilityElementInfoSetBackgroundImage
1520
1521```C
1522int32_t OH_ArkUI_AccessibilityElementInfoSetBackgroundImage(
1523    ArkUI_AccessibilityElementInfo* elementInfo, const char* backgroundImage);
1524```
1525
1526**Description**
1527
1528Sets the background image for an **ArkUI_AccessibilityElementInfo** struct.
1529
1530**Since**: 13
1531
1532**Parameters**
1533
1534| Name           | Description              |
1535| --------------- | ------------------ |
1536| elementInfo     | Pointer to an **ArkUI_AccessibilityElementInfo** struct.     |
1537| backgroundImage | Background image of the component.|
1538
1539**Returns**
1540
1541 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
1542
1543
1544
1545### OH_ArkUI_AccessibilityElementInfoSetBlur
1546
1547```C
1548int32_t OH_ArkUI_AccessibilityElementInfoSetBlur(
1549    ArkUI_AccessibilityElementInfo* elementInfo, const char* blur);
1550```
1551
1552**Description**
1553
1554Sets the blur effect for an **ArkUI_AccessibilityElementInfo** struct.
1555
1556**Since**: 13
1557
1558**Parameters**
1559
1560| Name       | Description            |
1561| ----------- | ---------------- |
1562| elementInfo | Pointer to an **ArkUI_AccessibilityElementInfo** struct.   |
1563| blur        | Blur effect information of the component.|
1564
1565**Returns**
1566
1567 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
1568
1569
1570
1571### OH_ArkUI_AccessibilityElementInfoSetHitTestBehavior
1572
1573```C
1574int32_t OH_ArkUI_AccessibilityElementInfoSetHitTestBehavior(
1575    ArkUI_AccessibilityElementInfo* elementInfo, const char* hitTestBehavior);
1576```
1577
1578**Description**
1579
1580Sets the hit test mode for an **ArkUI_AccessibilityElementInfo** struct.
1581
1582**Since**: 13
1583
1584**Parameters**
1585
1586| Name           | Description                                                        |
1587| --------------- | ------------------------------------------------------------ |
1588| elementInfo     | Pointer to an **ArkUI_AccessibilityElementInfo** struct.                                               |
1589| hitTestBehavior | Hit test mode. The options are as follows:<br>**HitTestMode.Default**: default mode<br>**HitTestMode.Block**: block mode<br>**HitTestMode.Transparent**: transparent mode<br>**HitTestMode.None**: disabled|
1590
1591**Returns**
1592
1593 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
1594
1595
1596
1597### OH_ArkUI_CreateAccessibilityEventInfo
1598
1599```C
1600ArkUI_AccessibilityEventInfo* OH_ArkUI_CreateAccessibilityEventInfo(void);
1601```
1602
1603**Description**
1604
1605Creates an **ArkUI_AccessibilityEventInfo** struct, which must be released by calling **OH_ArkUI_DestroyAccessibilityEventInfo** after use.
1606
1607**Since**: 13
1608
1609**Returns**
1610
1611Returns the pointer to the created **ArkUI_AccessibilityEventInfo** struct; returns **NULL** if creation fails.
1612
1613### OH_ArkUI_DestoryAccessibilityEventInfo
1614
1615```C
1616void OH_ArkUI_DestoryAccessibilityEventInfo(ArkUI_AccessibilityEventInfo* eventInfo);
1617```
1618
1619**Description**
1620
1621Destroys an **ArkUI_AccessibilityEventInfo** struct.
1622
1623**Since**: 13
1624
1625**Parameters**
1626
1627| Name     | Description                             |
1628| --------- | --------------------------------- |
1629| eventInfo | Pointer to the **ArkUI_AccessibilityEventInfo** struct to be destroyed.|
1630
1631**Returns**: none
1632
1633
1634
1635### OH_ArkUI_AccessibilityEventSetEventType
1636
1637```C
1638int32_t OH_ArkUI_AccessibilityEventSetEventType(
1639    ArkUI_AccessibilityEventInfo* eventInfo,  ArkUI_AccessibilityEventType eventType);
1640```
1641
1642**Description**
1643
1644Sets the event type for an **ArkUI_AccessibilityEventInfo** struct.
1645
1646**Since**: 13
1647
1648**Parameters**
1649
1650| Name     | Description                                                        |
1651| --------- | ------------------------------------------------------------ |
1652| eventInfo | Pointer to an **ArkUI_AccessibilityEventInfo** struct.                                         |
1653| eventType | Type of event, as defined in [ArkUI_AccessibilityEventType](#arkui_accessibilityeventtype).|
1654
1655**Returns**
1656
1657 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
1658
1659
1660
1661### OH_ArkUI_AccessibilityEventSetTextAnnouncedForAccessibility
1662
1663```C
1664int32_t OH_ArkUI_AccessibilityEventSetTextAnnouncedForAccessibility(
1665    ArkUI_AccessibilityEventInfo* eventInfo, const char* textAnnouncedForAccessibility);
1666```
1667
1668**Description**
1669
1670Sets the text to be announced for accessibility in an **ArkUI_AccessibilityEventInfo** struct.
1671
1672**Since**: 13
1673
1674**Parameters**
1675
1676| Name                         | Description                                                        |
1677| ----------------------------- | ------------------------------------------------------------ |
1678| eventInfo                     | Pointer to an **ArkUI_AccessibilityEventInfo** struct.                                         |
1679| textAnnouncedForAccessibility | Content to be announced when a proactive announcement event is sent. Applicable for event type ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_VIEW_ANNOUNCE_FOR_ACCESSIBILITY.|
1680
1681**Returns**
1682
1683 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
1684
1685
1686
1687### OH_ArkUI_AccessibilityEventSetRequestFocusId
1688
1689```
1690int32_t OH_ArkUI_AccessibilityEventSetRequestFocusId(
1691    ArkUI_AccessibilityEventInfo* eventInfo, int32_t requestFocusId);
1692```
1693
1694**Description**
1695
1696Sets the ID of the node to focus on in an **ArkUI_AccessibilityEventInfo** struct.
1697
1698**Since**: 13
1699
1700**Parameters**
1701
1702| Name          | Description                                                        |
1703| -------------- | ------------------------------------------------------------ |
1704| eventInfo      | Pointer to an **ArkUI_AccessibilityEventInfo** struct.                                         |
1705| requestFocusId | ID of the node to focus on when a proactive focus event is sent. The focus must be stable and not change. Applicable for event type ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_VIEW_REQUEST_FOCUS_FOR_ACCESSIBILITY.|
1706
1707**Returns**
1708
1709 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
1710
1711
1712
1713### OH_ArkUI_AccessibilityEventSetElementInfo
1714
1715```C
1716int32_t OH_ArkUI_AccessibilityEventSetElementInfo(
1717    ArkUI_AccessibilityEventInfo* eventInfo,  ArkUI_AccessibilityElementInfo* elementInfo);
1718```
1719
1720**Description**
1721
1722Sets the component information in an **ArkUI_AccessibilityEventInfo** struct.
1723
1724**Since**: 13
1725
1726**Parameters**
1727
1728| Name       | Description                    |
1729| ----------- | ------------------------ |
1730| eventInfo   | Pointer to an **ArkUI_AccessibilityEventInfo** struct.     |
1731| elementInfo | Component information for the event being sent.|
1732
1733**Returns**
1734
1735 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
1736
1737
1738
1739### OH_ArkUI_FindAccessibilityActionArgumentByKey
1740
1741```
1742int32_t OH_ArkUI_FindAccessibilityActionArgumentByKey(
1743    ArkUI_AccessibilityActionArguments* arguments, const char* key, char** value);
1744```
1745
1746**Description**
1747
1748Obtains the value associated with a specified key in an **ArkUI_AccessibilityEventInfo** struct.
1749
1750**Since**: 13
1751
1752**Parameters**
1753
1754| Name     | Description                  |
1755| --------- | ---------------------- |
1756| arguments | Parameters of the action.  |
1757| key       | Target key.             |
1758| value     | Value corresponding to the target key.|
1759
1760**Returns**
1761
1762 [ArkUI_AcessbilityErrorCode](#arkui_acessbilityerrorcode)
1763
1764
1765
1766## Enum Description
1767
1768### ArkUI_AcessbilityErrorCode
1769
1770**Description**
1771
1772Enumerates the error codes used in the HiDebug module.
1773
1774| Value                                         | Description      |
1775| ----------------------------------------------- | ---------- |
1776| ARKUI_ACCESSIBILITY_NATIVE_RESULT_SUCCESS       | Success.    |
1777| ARKUI_ACCESSIBILITY_NATIVE_RESULT_FAILED        | Failed.    |
1778| ARKUI_ACCESSIBILITY_NATIVE_RESULT_BAD_PARAMETER | Invalid parameter.|
1779| ARKUI_ACCESSIBILITY_NATIVE_RESULT_OUT_OF_MEMORY | Insufficient memory.|
1780
1781**Since**
1782
178313
1784
1785### ArkUI_AccessibilitySearchMode
1786
1787**Description**
1788
1789Enumerates the search modes.
1790
1791| Value                                                      | Description                                                    |
1792| ------------------------------------------------------------ | -------------------------------------------------------- |
1793| ARKUI_ACCESSIBILITY_NATIVE_SEARCH_MODE_PREFETCH_CURRENT      | Searches only for the information of the specified node.                                    |
1794| ARKUI_ACCESSIBILITY_NATIVE_SEARCH_MODE_PREFETCH_PREDECESSORS | Searches for the parent component. The search result includes the specified node information.                  |
1795| ARKUI_ACCESSIBILITY_NATIVE_SEARCH_MODE_PREFETCH_SIBLINGS     | Searches for sibling components. The search result includes the specified node information.            |
1796| ARKUI_ACCESSIBILITY_NATIVE_SEARCH_MODE_PREFETCH_CHILDREN     | Searches for the next level of child nodes of the current node. The search result includes the specified node information.|
1797| ARKUI_ACCESSIBILITY_NATIVE_SEARCH_MODE_PREFETCH_RECURSIVE_CHILDREN | Searches for all child nodes of the current node. The search result includes the specified node information.  |
1798
1799**Since**
1800
180113
1802
1803### ArkUI_AccessibilityFocusType
1804
1805**Description**
1806
1807Enumerates the focus types.
1808
1809| Value                                             | Description            |
1810| --------------------------------------------------- | ---------------- |
1811| ARKUI_ACCESSIBILITY_NATIVE_FOCUS_TYPE_INVALID       | Invalid value.        |
1812| ARKUI_ACCESSIBILITY_NATIVE_FOCUS_TYPE_INPUT         | Component focus.  |
1813| ARKUI_ACCESSIBILITY_NATIVE_FOCUS_TYPE_ACCESSIBILITY | Accessibility focus.|
1814
1815**Since**
1816
181713
1818
1819### ArkUI_Accessibility_ActionType
1820
1821**Description**
1822
1823Enumerates the action types.
1824
1825| Value                                                     | Description                                                        |
1826| ----------------------------------------------------------- | ------------------------------------------------------------ |
1827| ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_INVALID                   | Invalid value.                                                    |
1828| ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_CLICK                     | Performs a click action.                                                  |
1829| ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_LONG_CLICK                | Performs a long-click action.                                                  |
1830| ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_GAIN_ACCESSIBILITY_FOCUS  | Gains accessibility focus for an element.                                        |
1831| ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_CLEAR_ACCESSIBILITY_FOCUS | Clears the accessibility focus state of an element.                                    |
1832| ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_SCROLL_FORWARD            | Scrolls a scrollable component forward.                                    |
1833| ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_SCROLL_BACKWARD           | Scrolls a scrollable component backward.                                    |
1834| ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_COPY                      | Copies selected content in a text component.                            |
1835| ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_PASTE                     | Pastes content at the cursor position in a text component.                            |
1836| ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_CUT                       | Cuts selected content in a text component.                            |
1837| ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_SELECT_TEXT               | Selects a range of text within an editable area in a text component. Used together with [ArkUI_AccessibilityActionArguments](#arkui_accessibilityactionarguments) to configure **selectTextStart**, **selectTextEnd**, and **selectTextInForWard**.  |
1838| ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_SET_TEXT                  | Sets the text content of a text component.                                  |
1839| ARKUI_ACCESSIBILITY_NATIVE_ACTION_TYPE_SET_CURSOR_POSITION       | Sets the cursor position in a text component. Used together with [ArkUI_AccessibilityActionArguments](#arkui_accessibilityactionarguments) to configure **offset**.|
1840
1841**Since**
1842
184313
1844
1845### ArkUI_AccessibilityEventType
1846
1847**Description**
1848
1849Enumerates the event types.
1850
1851| Value                                                      | Description                                            |
1852| ------------------------------------------------------------ | ------------------------------------------------ |
1853| ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_INVALID                | Invalid value.                                        |
1854| ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_CLICKED                | Event when an item is clicked.                                    |
1855| ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_LONG_CLICKED           | Event when an item is long-clicked.                                    |
1856| ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_SELECTED               | Event when an item is selected.                                    |
1857| ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_TEXT_UPDATE            | Event to be sent when text is updated.                          |
1858| ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_PAGE_STATE_UPDATE      | Event to be sent when page navigation, switching, resizing, or moving occurs.|
1859| ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_PAGE_CONTENT_UPDATE    | Event to be sent when page content changes.              |
1860| ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_SCROLLED               | Event to be sent when a scrollable component is scrolled.    |
1861| ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_ACCESSIBILITY_FOCUSED  | Event when an item gains accessibility focus.                              |
1862| ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_ACCESSIBILITY_FOCUS_CLEARED | Event when accessibility focus is cleared.                            |
1863| ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_REQUEST_ACCESSIBILITY_FOCUS | Event to actively request focus on a specific node.                          |
1864| ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_PAGE_OPEN              | Event to be sent when a page is closed.                      |
1865| ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_PAGE_CLOSE             | Event to be sent when a page is opened.                      |
1866| ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_ANNOUNCE_FOR_ACCESSIBILITY | Event requesting proactive announcement of specific content.                    |
1867| ARKUI_ACCESSIBILITY_NATIVE_EVENT_TYPE_FOCUS_NODE_UPDATE      | Event to be sent when the focused component's position or size changes.      |
1868
1869**Since**
1870
187113
1872
1873### ArkUI_AccessibilityFocusMoveDirection
1874
1875**Description**
1876
1877Enumerates the focus movement directions.
1878
1879| Value                                       | Description                                |
1880| --------------------------------------------- | ------------------------------------ |
1881| ARKUI_ACCESSIBILITY_NATIVE_DIRECTION_INVALID  | Invalid value.                            |
1882| ARKUI_ACCESSIBILITY_NATIVE_DIRECTION_UP       | Move focus up.                      |
1883| ARKUI_ACCESSIBILITY_NATIVE_DIRECTION_DOWN     | Move focus down.                      |
1884| ARKUI_ACCESSIBILITY_NATIVE_DIRECTION_LEFT     | Move focus left.                      |
1885| ARKUI_ACCESSIBILITY_NATIVE_DIRECTION_RIGHT    | Move focus right.                      |
1886| ARKUI_ACCESSIBILITY_NATIVE_DIRECTION_FORWARD  | Move focus forward, based on the relationship in the search results.|
1887| ARKUI_ACCESSIBILITY_NATIVE_DIRECTION_BACKWARD | Move focus backward, based on the relationship in the search results.|
1888
1889**Since**
1890
189113
1892