目录

ArkUI_NodeAttributeType (Accessibility Attribute)

enum ArkUI_NodeAttributeType

Overview

Enumerates the accessibility attribute types that can be set by ArkUI on the native side, including the accessibility text, description, mode, state, and value.

Since: 12

Related module: ArkUI_NativeModule

Header file: native_node.h

NODE_ACCESSIBILITY_GROUP

NODE_ACCESSIBILITY_GROUP = 62

Accessibility group. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].i32 The value 1 means that the component and all its child components are treated as a single selectable component, and the accessibility service no longer focuses on the content of its child components. The value 0 means that each child component can be selected independently, and the accessibility service focuses on the content of each child component separately. The value can be 1 or 0. If an invalid value is passed in, this setting does not take effect.

Returns

Type Description
.value[0].i32 The value 1 means that the component and all its child components are treated as a single selectable component, and the accessibility service no longer focuses on the content of its child components. The value 0 means that the accessibility grouping is disabled, and each child component can be focused on individually by the accessibility service. The value can be 1 or 0.

NODE_ACCESSIBILITY_TEXT

NODE_ACCESSIBILITY_TEXT = 63

Accessibility text. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.string Accessibility text with no length limit.

Returns

Type Description
.string Accessibility text content of the component, used to announce or display the text description of the component in the accessibility service.

NODE_ACCESSIBILITY_MODE

NODE_ACCESSIBILITY_MODE = 64

Accessibility mode. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].i32 Accessibility mode. The parameter type is ArkUI_AccessibilityMode.

Returns

Type Description
.value[0].i32 Accessibility mode. The parameter type is ArkUI_AccessibilityMode.

NODE_ACCESSIBILITY_DESCRIPTION

NODE_ACCESSIBILITY_DESCRIPTION = 65

Accessibility description. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.string Accessibility description with no length limit.

Returns

Type Description
.string Accessibility description content of the component, used to supplement the detailed purpose or operation instructions of the component for the accessibility service.

NODE_ACCESSIBILITY_ID

NODE_ACCESSIBILITY_ID = 87

Custom accessibility ID. This attribute can be obtained as required through APIs.

The format of the return value ArkUI_AttributeItem is as follows.

Since: 12

Returns

Type Description
.value[0].i32 Custom accessibility ID.

NODE_ACCESSIBILITY_ACTIONS

NODE_ACCESSIBILITY_ACTIONS = 88

Accessibility action type. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].u32 Accessibility action type. The parameter type is ArkUI_AccessibilityActionType.

Returns

Type Description
.value[0].u32 Accessibility action type. The parameter type is ArkUI_AccessibilityActionType.

NODE_ACCESSIBILITY_ROLE

NODE_ACCESSIBILITY_ROLE = 89

Accessibility role. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.value[0].u32 Accessibility role. The parameter type is ArkUI_NodeType.

Returns

Type Description
.value[0].u32 Accessibility role. The parameter type is ArkUI_NodeType.

NODE_ACCESSIBILITY_STATE

NODE_ACCESSIBILITY_STATE = 90

Accessibility state. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.object Accessibility state. The parameter type is ArkUI_AccessibilityState.

Returns

Type Description
.object Accessibility state. The parameter type is ArkUI_AccessibilityState.

NODE_ACCESSIBILITY_VALUE

NODE_ACCESSIBILITY_VALUE = 91

Accessibility value. This attribute can be set, reset, and obtained as required through APIs.

The format of the ArkUI_AttributeItem parameter for setting the attribute and the format of the return value ArkUI_AttributeItem are as follows.

Since: 12

Parameters

Name Description
.object Accessibility value. The parameter type is ArkUI_AccessibilityValue.

Returns

Type Description
.object Accessibility value. The parameter type is ArkUI_AccessibilityValue.