diff --git a/api/@internal/component/ets/common.d.ts b/api/@internal/component/ets/common.d.ts index f1c6d2eaaba7229b6e597dd08e8feb5ea952880a..7970ba0618a574ef9fbb2ef4f003db98cd5dbcc5 100644 --- a/api/@internal/component/ets/common.d.ts +++ b/api/@internal/component/ets/common.d.ts @@ -29929,11 +29929,29 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ accessibilityGroup(value: boolean): T; + /** + * Sets whether to enable accessibility grouping. + * + *

NOTE + *
Whether to enable accessibility grouping. When accessibility grouping is enabled, + *
the component and all its children are treated as a single selectable unit, and the accessibility + *
service will no longer focus on the individual child components.

+ * + * @param { boolean } value - set group with accessibility, default value is false. + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + accessibilityGroupWithValue(value: boolean | undefined): T; + /** * Sets whether to enable accessibility grouping. * @@ -29955,11 +29973,42 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ accessibilityGroup(isGroup: boolean, accessibilityOptions: AccessibilityOptions): T; + /** + * Sets whether to enable accessibility grouping. + * + *

NOTE + *
If accessibility grouping is enabled and the component does not contain a universal text attribute + *
or an accessibility text attribute, the system will concatenate the universal text attributes of + *
its child components to form a merged text for the component. If a child component lacks a universal + *
text attribute, it will be ignored in the concatenation process. + * + *
When accessibilityPreferred is set to true, the system will prioritize concatenating the accessibility + *
text attributes of the child components to form the merged text. If a child component lacks an + *
accessibility text attribute, the system will continue to concatenate its universal text attribute. + *
If a child component lacks both, it will be ignored.

+ * + * @param { boolean } isGroup - set group with accessibility, default value is false. + * @param { AccessibilityOptions } config - accessibilityOptions for accessibility, default value is false. + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + accessibilityGroupWithConfig(isGroup: boolean | undefined, config: AccessibilityOptions | undefined): T; + + /** + * @since 20 + * @arkts 1.2 + */ + overload accessibilityGroup { accessibilityGroupWithValue, accessibilityGroupWithConfig }; + /** * Sets the accessibility text. * @@ -29990,11 +30039,26 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ accessibilityText(value: string): T; + /** + * Sets the accessibility text. + * When a component does not contain a text attribute, you can use this API to set an accessibility + * text attribute, so that accessibility services can announce the specified content for the component. + * + * @param { string } value - set accessibility text, default value is "". + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + accessibilityTextOfStringType(value: string | undefined): T; + /** * Sets accessibility next focus id * @param { string } nextId - set component next accessibility focus id @@ -30061,11 +30125,36 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ accessibilityText(text: Resource): T; + /** + * Sets the accessibility text. + *

NOTE + * If a component has both text content and accessibility text, only the accessibility text is announced. + *
If a component is grouped for accessibility purposes but lacks both text content and accessibility + *
text, the screen reader will concatenate text from its child components (depth-first traversal). + *
To prioritize accessibility text concatenation, set accessibilityPreferred in accessibilityGroup. + *

+ * @param { Resource } text - set accessibility text + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + accessibilityTextOfResourceType(text: Resource | undefined): T; + + /** + * @since 20 + * @arkts 1.2 + */ + overload accessibilityText { accessibilityTextOfStringType, accessibilityTextOfResourceType }; + + /** * Sets accessibility role,role indicates the custom type of the component * @param { AccessibilityRoleType } role - set accessibility component type @@ -30147,11 +30236,24 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ accessibilityDescription(value: string): T; + /** + * Sets accessibilityDescription + * + * @param { string } value - set description of accessibility, default value is "". + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + accessibilityDescriptionOfStringType(value: string | undefined): T; + /** * Sets accessibilityDescription * @@ -30170,11 +30272,39 @@ declare class CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ accessibilityDescription(description: Resource): T; + /** + * Sets accessibilityDescription + * + * with support for resource references using Resource. + * This property provides additional context or explanation for the component, + * helping users understand the action or function it performs. + *

NOTE: + *
Reference resource of the accessibility description. You can specify further explanation + *
of the current component, for example, possible operation consequences, especially those that + *
cannot be learned from component attributes and accessibility text. If a component contains + *
both text information and the accessibility description, the text is read first and then the + *
accessibility description, when the component is selected.

+ * @param { Resource } description - set description of accessibility + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + accessibilityDescriptionOfResourceType(description: Resource | undefined): T; + + /** + * @since 20 + * @arkts 1.2 + */ + overload accessibilityDescription { accessibilityDescriptionOfStringType, accessibilityDescriptionOfResourceType }; + /** * Sets the accessibility level. * This property determines whether the component can be recognized by accessibility services.