diff --git a/en/application-dev/reference/apis-arkui/arkui-ts/figures/accessibilityUseSamePage.png b/en/application-dev/reference/apis-arkui/arkui-ts/figures/accessibilityUseSamePage.png
new file mode 100644
index 0000000000000000000000000000000000000000..6517c5252b96def9ece47eed83dd207806942004
Binary files /dev/null and b/en/application-dev/reference/apis-arkui/arkui-ts/figures/accessibilityUseSamePage.png differ
diff --git a/en/application-dev/reference/apis-arkui/arkui-ts/figures/applyDisabledAttribute.gif b/en/application-dev/reference/apis-arkui/arkui-ts/figures/applyDisabledAttribute.gif
new file mode 100644
index 0000000000000000000000000000000000000000..ff047828eeaa2e38ac829e6f5e1d4a3ca58a20fc
Binary files /dev/null and b/en/application-dev/reference/apis-arkui/arkui-ts/figures/applyDisabledAttribute.gif differ
diff --git a/en/application-dev/reference/apis-arkui/arkui-ts/figures/applyFocusedAttribute.gif b/en/application-dev/reference/apis-arkui/arkui-ts/figures/applyFocusedAttribute.gif
new file mode 100644
index 0000000000000000000000000000000000000000..f1502f158c16f7c9e1281ef6ba1cd47a97ec237a
Binary files /dev/null and b/en/application-dev/reference/apis-arkui/arkui-ts/figures/applyFocusedAttribute.gif differ
diff --git a/en/application-dev/reference/apis-arkui/arkui-ts/figures/applySelectedAttribute.gif b/en/application-dev/reference/apis-arkui/arkui-ts/figures/applySelectedAttribute.gif
new file mode 100644
index 0000000000000000000000000000000000000000..01379c0bb6d0554464700854360b9821be096d3c
Binary files /dev/null and b/en/application-dev/reference/apis-arkui/arkui-ts/figures/applySelectedAttribute.gif differ
diff --git a/en/application-dev/reference/apis-arkui/arkui-ts/figures/drawModifier.png b/en/application-dev/reference/apis-arkui/arkui-ts/figures/drawModifier.png
new file mode 100644
index 0000000000000000000000000000000000000000..6ce15999035382a0b16b0a0480ffab4e36dff00c
Binary files /dev/null and b/en/application-dev/reference/apis-arkui/arkui-ts/figures/drawModifier.png differ
diff --git a/en/application-dev/reference/apis-arkui/arkui-ts/figures/en-us_image_lazyvgridlayout1.png b/en/application-dev/reference/apis-arkui/arkui-ts/figures/en-us_image_lazyvgridlayout1.png
new file mode 100644
index 0000000000000000000000000000000000000000..a1d173eff21f1f63a237452f929fd28b6fea3ea4
Binary files /dev/null and b/en/application-dev/reference/apis-arkui/arkui-ts/figures/en-us_image_lazyvgridlayout1.png differ
diff --git a/en/application-dev/reference/apis-arkui/arkui-ts/ts-component-general-attributes.md b/en/application-dev/reference/apis-arkui/arkui-ts/ts-component-general-attributes.md
index bfce463dec1991479522f9efdfa4518a68e6e927..11b93d3b69a6289b46986b488fce5c9d0fd11bb6 100644
--- a/en/application-dev/reference/apis-arkui/arkui-ts/ts-component-general-attributes.md
+++ b/en/application-dev/reference/apis-arkui/arkui-ts/ts-component-general-attributes.md
@@ -29,7 +29,7 @@
- [Foreground Effect](ts-universal-attributes-foreground-effect.md)
- [Foreground Blur](ts-universal-attributes-foreground-blur-style.md)
- [Motion Blur](ts-universal-attributes-motionBlur.md)
-- [Click Effect](ts-universal-attributes-click-effect.md)
+- [Click Feedback Effect](ts-universal-attributes-click-effect.md)
- [Accessibility](ts-universal-attributes-accessibility.md)
- [Attribute Modifier](ts-universal-attributes-attribute-modifier.md)
- [Gesture Modifier](ts-universal-attributes-gesture-modifier.md)
@@ -48,6 +48,7 @@
- [Obscuring](ts-universal-attributes-obscured.md)
- [Universal Text Attributes](ts-universal-attributes-text-style.md)
- [Drag and Drop Control](ts-universal-attributes-drag-drop.md)
+- [Drag-and-Drop Sorting](ts-universal-attributes-drag-sorting.md)
- [Safe Area](ts-universal-attributes-expand-safe-area.md)
- [Render Fit](ts-universal-attributes-renderfit.md)
- [Event Monopolization](ts-universal-attributes-monopolize-events.md)
diff --git a/en/application-dev/reference/apis-arkui/arkui-ts/ts-container-lazyvgridlayout.md b/en/application-dev/reference/apis-arkui/arkui-ts/ts-container-lazyvgridlayout.md
new file mode 100644
index 0000000000000000000000000000000000000000..77a696c9f0322fab7ec40af0345d56a48eb43862
--- /dev/null
+++ b/en/application-dev/reference/apis-arkui/arkui-ts/ts-container-lazyvgridlayout.md
@@ -0,0 +1,237 @@
+# LazyVGridLayout
+
+The **LazyVGridLayout** component implements a lazy-loading grid layout, with its parent component restricted to [WaterFlow](ts-container-waterflow.md) or [FlowItem](ts-container-flowitem.md). It can also be used within the **WaterFlow** or **FlowItem** component after being wrapped by custom components or [NodeContainer](ts-basic-components-nodecontainer.md).
+
+Lazy loading is supported only when the **WaterFlow** component uses single-column mode or single-column segments in segmented layout and the layout direction is **FlexDirection.Column**. Lazy loading is not supported if the **WaterFlow** component is in multi-column mode or the layout direction is **FlexDirection.Row** or **FlexDirection.RowReverse**. Using this component with **FlexDirection.ColumnReverse** in the **WaterFlow** component causes display anomalies. When lazy loading is enabled, the component only loads child components within the **WaterFlow** visible area, with pre-loading of half-screen content above and below the viewport during frame idle periods.
+
+> **NOTE**
+>
+> - This component is supported since API version 19. Updates will be marked with a superscript to indicate their earliest API version.
+> - This component's height adapts to content by default. Setting the height, height constraints, or aspect ratio causes display anomalies.
+
+## APIs
+
+LazyVGridLayout()
+
+Creates a vertical lazy-loading grid layout container.
+
+**Atomic service API**: This API can be used in atomic services since API version 19.
+
+**System capability**: SystemCapability.ArkUI.ArkUI.Full
+
+## Attributes
+
+In addition to the [universal attributes](ts-component-general-attributes.md), the following attributes are supported.
+
+### columnsTemplate
+
+columnsTemplate(value: string)
+
+Sets the number of columns, fixed column width, or minimum column width of the grid. If this attribute is not set, one column will be used.
+
+For example, **'1fr 1fr 2fr'** indicates three columns, with the first column taking up 1/4 of the parent component's full width, the second column 1/4, and the third column 2/4.
+
+**columnsTemplate('repeat(auto-fit, track-size)')**: The layout automatically calculates the number of columns and the actual column width, while adhering to the minimum column width specified with **track-size**.
+
+**columnsTemplate('repeat(auto-fill, track-size)')**: The layout automatically calculates the number of columns based on the fixed column width specified with **track-size**.
+
+**columnsTemplate('repeat(auto-stretch, track-size)')**: The layout uses **columnsGap** to define the minimum gap between columns and automatically calculates the number of columns and the actual gap size based on the fixed column width specified with **track-size**.
+
+**repeat**, **auto-fit**, **auto-fill**, and **auto-stretch** are keywords. **track-size** indicates the column width, in the unit of px, vp (default), %, or any valid digit. The value must be greater than or equal to one valid column width.
+In **auto-stretch** mode, **track-size** must be a valid column width value, in the unit of px, vp, or any valid digit; percentage values (%) are not supported.
+
+If this attribute is set to **'0fr'**, the column width is 0, and child components are not displayed. If this attribute is set to an invalid value, the child components are displayed in a fixed column.
+
+**Atomic service API**: This API can be used in atomic services since API version 19.
+
+**System capability**: SystemCapability.ArkUI.ArkUI.Full
+
+**Parameters**
+
+| Name| Type | Mandatory| Description |
+| ------ | ------ | ---- | ---------------------------------- |
+| value | string | Yes | Number of columns or minimum column width of the grid.|
+
+### columnsGap
+
+columnsGap(value: LengthMetrics): T
+
+Sets the gap between columns. A value less than 0 evaluates to the default value.
+
+**Atomic service API**: This API can be used in atomic services since API version 19.
+
+**System capability**: SystemCapability.ArkUI.ArkUI.Full
+
+**Parameters**
+
+| Name| Type | Mandatory| Description |
+| ------ | ---------------------------- | ---- | ---------------------------- |
+| value | [LengthMetrics](../js-apis-arkui-graphics.md#lengthmetrics12) | Yes | Gap between columns. Default value: **0vp**|
+
+**Return value**
+
+| Type| Description |
+| --- | -------------- |
+| T | Current component.|
+
+### rowsGap
+
+rowsGap(value: LengthMetrics): T
+
+Sets the gap between rows. A value less than 0 evaluates to the default value.
+
+**Atomic service API**: This API can be used in atomic services since API version 19.
+
+**System capability**: SystemCapability.ArkUI.ArkUI.Full
+
+**Parameters**
+
+| Name| Type | Mandatory| Description |
+| ------ | ---------------------------- | ---- | ---------------------------- |
+| value | [LengthMetrics](../js-apis-arkui-graphics.md#lengthmetrics12) | Yes | Gap between rows. Default value: **0vp**|
+
+**Return value**
+
+| Type| Description |
+| --- | -------------- |
+| T | Current component.|
+
+## Events
+
+Only the [universal events](ts-component-general-events.md) are supported.
+
+## Example
+
+This example demonstrates how to implement a lazy-loading grid layout using the **WaterFlow** and **LazyVGridLayout** components.
+
+
+```ts
+import { LengthMetrics } from '@kit.ArkUI'
+import { MyDataSource } from './MyDataSource'
+
+@Entry
+@Component
+struct LazyVGridLayoutSample1 {
+ private arr:MyDataSource = new MyDataSource();
+ build() {
+ Column() {
+ WaterFlow() {
+ LazyVGridLayout() {
+ LazyForEach(this.arr, (item:number)=>{
+ Text("item" + item.toString())
+ .height(64)
+ .width("100%")
+ .borderRadius(5)
+ .backgroundColor(Color.White)
+ .textAlign(TextAlign.Center)
+ })
+ }
+ .columnsTemplate("1fr 1fr")
+ .rowsGap(LengthMetrics.vp(10))
+ .columnsGap(LengthMetrics.vp(10))
+ }.padding(10)
+ }
+ .width('100%').height('100%')
+ .backgroundColor("#DCDCDC")
+ }
+
+ aboutToAppear(): void {
+ for (let i = 0; i < 100; i++) {
+ this.arr.pushData(i);
+ }
+ }
+}
+```
+
+
+```ts
+// MyDataSource.ets
+export class BasicDataSource implements IDataSource {
+ private listeners: DataChangeListener[] = [];
+ protected dataArray: T[] = [];
+
+ public totalCount(): number {
+ return this.dataArray.length;
+ }
+
+ public getData(index: number): T {
+ return this.dataArray[index];
+ }
+
+ registerDataChangeListener(listener: DataChangeListener): void {
+ if (this.listeners.indexOf(listener) < 0) {
+ console.info('add listener');
+ this.listeners.push(listener);
+ }
+ }
+
+ unregisterDataChangeListener(listener: DataChangeListener): void {
+ const pos = this.listeners.indexOf(listener);
+ if (pos >= 0) {
+ console.info('remove listener');
+ this.listeners.splice(pos, 1);
+ }
+ }
+
+ notifyDataReload(): void {
+ this.listeners.forEach(listener => {
+ listener.onDataReloaded();
+ })
+ }
+
+ notifyDataAdd(index: number): void {
+ this.listeners.forEach(listener => {
+ listener.onDataAdd(index);
+ })
+ }
+
+ notifyDataChange(index: number): void {
+ this.listeners.forEach(listener => {
+ listener.onDataChange(index);
+ })
+ }
+
+ notifyDataDelete(index: number): void {
+ this.listeners.forEach(listener => {
+ listener.onDataDelete(index);
+ })
+ }
+
+ notifyDataMove(from: number, to: number): void {
+ this.listeners.forEach(listener => {
+ listener.onDataMove(from, to);
+ })
+ }
+
+ notifyDatasetChange(operations: DataOperation[]): void {
+ this.listeners.forEach(listener => {
+ listener.onDatasetChange(operations);
+ })
+ }
+}
+
+export class MyDataSource extends BasicDataSource {
+ public shiftData(): void {
+ this.dataArray.shift();
+ this.notifyDataDelete(0);
+ }
+ public unshiftData(data: T): void {
+ this.dataArray.unshift(data);
+ this.notifyDataAdd(0);
+ }
+ public pushData(data: T): void {
+ this.dataArray.push(data);
+ this.notifyDataAdd(this.dataArray.length - 1);
+ }
+ public popData(): void {
+ this.dataArray.pop();
+ this.notifyDataDelete(this.dataArray.length);
+ }
+ public clearData(): void {
+ this.dataArray = [];
+ this.notifyDataReload();
+ }
+}
+```
+
+
diff --git a/en/application-dev/reference/apis-arkui/arkui-ts/ts-universal-attributes-accessibility.md b/en/application-dev/reference/apis-arkui/arkui-ts/ts-universal-attributes-accessibility.md
index 6e2edb5fffe58947cfed8c269616e1b50b07c8b6..75009f00af2ae1f90ff2062255e1f17aa1ceb13a 100644
--- a/en/application-dev/reference/apis-arkui/arkui-ts/ts-universal-attributes-accessibility.md
+++ b/en/application-dev/reference/apis-arkui/arkui-ts/ts-universal-attributes-accessibility.md
@@ -1,10 +1,10 @@
# Accessibility
-You can set accessibility attributes and events for components.
+You can set accessibility attributes and events for components to fully leverage accessibility features.
> **NOTE**
>
-> The APIs of this module are supported since API version 10. Updates will be marked with a superscript to indicate their earliest API version.
+> The initial APIs of this module are supported since API version 10. Updates will be marked with a superscript to indicate their earliest API version.
## accessibilityGroup
@@ -12,7 +12,7 @@ accessibilityGroup(value: boolean)
Sets 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.
-If accessibility grouping is enabled and the component does not contain a universal text attribute or an [accessibility text](#accessibilitytext) 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. The merged text will not use the accessibility text of the child components.
+If accessibility grouping is enabled for a component that does not contain a universal text attribute or an [accessibility text](#accessibilitytext) attribute, the system will concatenate the universal text attributes of its child components to generate merged text for the component. Child components without universal text attributes will be ignored during concatenation, and their accessibility text (if any) won't be used in the merged text.
**Widget capability**: This API can be used in ArkTS widgets since API version 12.
@@ -24,17 +24,17 @@ If accessibility grouping is enabled and the component does not contain a univer
| Name| Type | Mandatory| Description |
| ------ | ------- | ---- | ------------------------------------------------------------ |
-| value | boolean | Yes | 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. Default value: **false**|
+| value | boolean | Yes | Whether to enable accessibility grouping. The value **true** means to enable accessibility grouping, and **false** means the opposite. 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. Default value: **false**|
## accessibilityGroup14+
accessibilityGroup(isGroup: boolean, accessibilityOptions: AccessibilityOptions)
-Sets whether to enable accessibility grouping, with support for prioritizing the concatenation of accessibility text for accessibility announcement. When accessibility grouping is enabled, the component and all its children are treated as a single selectable entity, and the accessibility service will no longer focus on the individual child components.
+Sets 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.
-If accessibility grouping is enabled and the component does not contain a universal text attribute or an [accessibility text](#accessibilitytext) 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.
+If accessibility grouping is enabled for a component that does not contain a universal text attribute or an [accessibility text](#accessibilitytext) attribute, the system will concatenate the universal text attributes of its child components to generate merged text for the component. Child components without universal text attributes will be ignored during concatenation.
-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.
+When **accessibilityPreferred** is set to **true**, the system will prioritize concatenating the accessibility text attributes of the child components. If a child component has no accessibility text set, its universal text attribute will be used instead. Components without either attribute will be excluded from concatenation.
**Widget capability**: This API can be used in ArkTS widgets since API version 14.
@@ -46,8 +46,8 @@ When **accessibilityPreferred** is set to **true**, the system will prioritize c
| Name | Type | Mandatory| Description |
| -------------------- | ------------------------------------------------------- | ---- | ------------------------------------------------------------ |
-| isGroup | boolean | Yes | 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. Default value: **false**|
-| accessibilityOptions | [AccessibilityOptions](#accessibilityoptions14) | Yes | Options for accessibility grouping. When **accessibilityPreferred** is set to **true**, the system will prioritize concatenating the accessibility text attributes of the child components to form the merged text. Default value: **false** |
+| isGroup | boolean | Yes | Whether to enable accessibility grouping. The value **true** means to enable accessibility grouping, and **false** means the opposite. 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. Default value: **false**|
+| accessibilityOptions | [AccessibilityOptions](#accessibilityoptions14) | Yes | Options for accessibility grouping. When **accessibilityPreferred** is set to **true**, the system will prioritize concatenating accessibility text for screen readers. When **accessibilityPreferred** is set to **false**, accessibility text will not be prioritized. Default value: **false** |
## AccessibilityOptions14+
@@ -55,7 +55,7 @@ When **accessibilityPreferred** is set to **true**, the system will prioritize c
| Name | Type | Mandatory| Description |
| ---------------------- | ------- | ---- | ------------------------------------------------------------ |
-| accessibilityPreferred | boolean | No | Whether to prioritize the accessibility text of child components during a deep traversal. The value **true** means to prioritize the accessibility text of child components. If a child component's accessibility text is empty, the accessibility service uses the component's own text content. The concatenated text is then assigned to the parent node if both its accessibility text and text content are empty. Default value: **false**|
+| accessibilityPreferred | boolean | No | Whether to prioritize the accessibility text of child components during a deep traversal. The value **true** means to prioritize the accessibility text of child components. If a child component's accessibility text is empty, the accessibility service uses the component's own text content. The concatenated text is then assigned to the parent node if both its accessibility text and text content are empty. The value **false** means not to prioritize the accessibility text of child components. Default value: **false**|
## accessibilityText
@@ -170,7 +170,7 @@ Sets an accessibility virtual child node. For custom drawing components, a **Cus
accessibilityChecked(isCheck: boolean)
-Sets the checked state of the accessibility component. This property is used in multi-select scenarios.
+Sets the checked state of the accessibility component. This property is used in multiselect scenarios.
**Widget capability**: This API can be used in ArkTS widgets since API version 13.
@@ -182,7 +182,7 @@ Sets the checked state of the accessibility component. This property is used in
| Name | Type | Mandatory| Description |
| ------- | ------- | ---- | ------------------------------------------------------------ |
-| isCheck | boolean | Yes | Whether the current component is selected. The options are as follows: **true**: The component is selected. **false**: The component is not selected. **undefined**: The component determines its own selected state. Default value: **undefined** **NOTE** 1. Setting this parameter to **true** or **false** will automatically set the component's **checkable** attribute to **true**. 2. When this parameter is set to **true** or **false**, to use it with **accessibilitySelected**, set the **accessibilitySelected** parameter to **undefined**.|
+| isCheck | boolean | Yes | Whether the current component is selected. The options are as follows: **true**: The component is selected. **false**: The component is not selected. **undefined**: The component determines its own selected state. Default value: **undefined**. **NOTE** 1. Setting this parameter to **true** or **false** will automatically set the component's **checkable** attribute to **true**. 2. When this parameter is set to **true** or **false**, to use it with **accessibilitySelected**, set the **accessibilitySelected** parameter to **undefined**.|
## accessibilitySelected13+
@@ -200,7 +200,7 @@ Sets the selected state of the accessibility component. This property is used in
| Name | Type | Mandatory| Description |
| -------- | ------- | ---- | ------------------------------------------------------------ |
-| isSelect | boolean | Yes | Whether the current component is selected. The options are as follows: **true**: The component is selected. **false**: The component is not selected. **undefined**: The component determines its own selected state. Default value: **undefined** **NOTE** 1. When this parameter is set to **true** or **false**, to use it with **accessibilityChecked**, set the **accessibilityChecked** parameter to **undefined**.|
+| isSelect | boolean | Yes | Whether the current component is selected. The options are as follows: **true**: The component is selected. **false**: The component is not selected. **undefined**: The component determines its own selected state. Default value: **undefined**. **NOTE** 1. When this parameter is set to **true** or **false**, to use it with **accessibilityChecked**, set the **accessibilityChecked** parameter to **undefined**.|
## accessibilityRole18+
@@ -430,7 +430,7 @@ Sets whether the component is the default initial focus for screen readers on th
accessibilityUseSamePage(pageMode: AccessibilitySamePageMode)
-Solves focus jumping issues in sub-tree scenarios like UIExtensionComponent. Sets the same-page mode for this UIExtensionComponent and the host application. This property is intended to solve focus jumping issues in sub-tree scenarios. Due to the timing of page events sent by the UIExtensionComponent and the host application, focus may jump from one component to another, causing "focus jumping."
+Solves focus jumping issues in sub-tree scenarios for cross-process embedded components, such as **UIExtensionComponent**. Focus jumping occurs when the timing of page events from the embedded component's process conflicts with those of the host application, causing focus to unexpectedly shift between components.
**Widget capability**: This API can be used in ArkTS widgets since API version 18.
@@ -442,11 +442,11 @@ Solves focus jumping issues in sub-tree scenarios like UIExtensionComponent. Set
| Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------ |
-| pageMode | [AccessibilitySamePageMode](#accessibilitysamepagemode18) | Yes | Same-page mode for the current UIExtensionComponent and the host application.|
+| pageMode | [AccessibilitySamePageMode](#accessibilitysamepagemode18) | Yes | Same-page mode for the cross-process embedded component and the host application.|
## AccessibilitySamePageMode18+
-Enumerates the same-page modes for the current UIExtensionComponent and the host application.
+Enumerates the same-page modes for cross-process embedded components and their host applications.
**Atomic service API**: This API can be used in atomic services since API version 18.
@@ -454,8 +454,8 @@ Enumerates the same-page modes for the current UIExtensionComponent and the host
| Name | Value | Description |
| ----------- | ---- | ------------------------------------------------------------ |
-| SEMI_SILENT | 0 | Ignores page events sent by the root node of the UIExtensionComponent page or during the initial page load.|
-| FULL_SILENT | 1 | Ignores all page events in the UIExtensionComponent. |
+| SEMI_SILENT | 0 | Ignores initial page loading events and root node page events from the cross-process embedded component.|
+| FULL_SILENT | 1 | Ignores all page events from the cross-process embedded component. |
## accessibilityScrollTriggerable18+
@@ -473,7 +473,7 @@ Sets whether to enable automatic scrolling for screen readers when the current p
| Name | Type | Mandatory| Description |
| -------------- | ------- | ---- | ------------------------------------------------------------ |
-| isTriggerable | boolean | Yes | Whether the component supports automatic scrolling for screen readers when the current page has no focusable components. The options are as follows: **true**: The component triggers automatic scrolling for screen readers when the current page has no focusable components. **false**: The component does not trigger automatic scrolling for screen readers when the current page has no focusable components. **undefined**: The default settings are restored. Default value: **true** **NOTE** 1. This parameter does not affect the original **scrollable** attribute of the component. 2. The final scrolling behavior is determined by the screen reader based on this parameter and whether the component supports scrolling. 3. This API applies to all basic components. It is recommended for scrollable components, including **List**, **Grid**, **Scroll**, **Waterflow**, and **Swiper**.|
+| isTriggerable | boolean | Yes | Whether the component supports automatic scrolling for screen readers when the current page has no focusable components. The options are as follows: **true**: The component triggers automatic scrolling for screen readers when the current page has no focusable components. **false**: The component does not trigger automatic scrolling for screen readers when the current page has no focusable components. **undefined**: The default settings are restored. Default value: **true** **NOTE** 1. This parameter does not affect the original **scrollable** attribute of the component. 2. The final scrolling behavior is determined by the screen reader based on this parameter and whether the component supports scrolling. 3. This API applies to all basic components. It is recommended for scrollable components, including **List**, **Grid**, **Scroll**, and **WaterFlow**.|
## accessibilityTextHint12+
@@ -527,7 +527,7 @@ struct Index {
.accessibilityGroup(true)
.accessibilityLevel("yes")
.accessibilityText("Group") // If a component has both text content and accessibility text, only the accessibility text is announced.
- .accessibilityDescription("The Column component is selectable , and the text to be read out is "Group".)
+ .accessibilityDescription("The Column component can be selected, and the announced content is 'Group'")
.accessibilityVirtualNode(this.customAccessibilityNode)
.accessibilityChecked(true)
.accessibilitySelected(undefined)
@@ -567,3 +567,181 @@ struct Focus {
}
```
+### Example 3: Setting the Initial Focus and the Next Focus of a Component
+
+This example demonstrates the use of **accessibilityDefaultFocus** to set the default initial focus for the screen reader on the current page and **accessibilityNextFocusId** to set the next focus for components during focus traversal.
+
+```ts
+// xxx.ets
+@Entry
+@Component
+struct Index {
+ build() {
+ Column({ space: 20 }) {
+ Text('Text Demo 1')
+ .fontSize(50)
+ .accessibilityLevel('yes')
+ .accessibilityNextFocusId('text3')
+ Text('Text Demo 2')
+ .id('text2')
+ .fontSize(50)
+ .accessibilityLevel('yes')
+ .accessibilityDefaultFocus(true) // Set the component as initial focus for the screen reader.
+ .accessibilityNextFocusId('text4')
+ Text('Text Demo 3')
+ .id('text3')
+ .fontSize(50)
+ .accessibilityLevel('yes')
+ .accessibilityNextFocusId('text2')
+ Text('Text Demo 4')
+ .id('text4')
+ .fontSize(50)
+ .accessibilityLevel('yes')
+ }
+ .height('100%')
+ .width('100%')
+ }
+}
+```
+
+### Example 4: Setting the Accessibility Component Type and Text Hint
+
+This example demonstrates the use of **accessibilityRole** to set the accessibility component type and **accessibilityTextHint** to provide text hints for components that can be queried by assistive technologies.
+
+```ts
+// xxx.ets
+@Entry
+@Component
+struct Index {
+ @State isDownloading: boolean = false;
+ @State hintStr: string = 'Click to start download';
+
+ build() {
+ Column({ space: 20 }) {
+ Button(this.isDownloading ? 'Downloading' : 'Click to download')
+ .accessibilityLevel('yes')
+ .accessibilityTextHint(this.hintStr)
+ .onClick(() => {
+ this.isDownloading = !this.isDownloading;
+ this.hintStr = this.isDownloading ? 'Status changed to downloading' : 'Status changed to paused';
+ })
+ TextInput({ placeholder: 'Enter phone number' })
+ .accessibilityLevel('yes')
+ .accessibilityTextHint('Enter an 11-digit phone number')
+ .width('80%')
+ Text('Announced as button type')
+ .accessibilityLevel('yes')
+ .accessibilityRole(AccessibilityRoleType.BUTTON)
+ .accessibilityTextHint('The screen reader will announce this component as a button')
+ .fontSize(30)
+ }
+ .height('100%')
+ .width('100%')
+ }
+}
+```
+
+### Example 5: Configuring Screen Reader Scrolling and Cross-Process Focus
+
+This example demonstrates the use of **accessibilityScrollTriggerable** to set whether an accessibility node supports screen reading scroll and **accessibilityUseSamePage** for cross-process embedded components like **EmbeddedComponent**.
+
+```ts
+// xxx.ets
+import { Want } from '@kit.AbilityKit';
+
+@Entry
+@Component
+struct Index {
+ @State message: string = 'Message: ';
+ private want: Want = {
+ bundleName: 'com.example.embeddeddemo',
+ abilityName: 'ExampleEmbeddedAbility',
+ }
+
+ build() {
+ Row() {
+ List() {
+ ListItem() {
+ Column() {
+ Text(this.message)
+ .fontSize(18)
+ .fontColor('#2D2D2D')
+ .fontWeight(FontWeight.Medium)
+ Column() {
+ EmbeddedComponent(this.want, EmbeddedType.EMBEDDED_UI_EXTENSION)
+ .width('100%')
+ .height('90%')
+ .onTerminated((info) => {
+ this.message = 'Termination: code = ' + info.code + ', want = ' + JSON.stringify(info.want);
+ })
+ .onError((error) => {
+ this.message = 'Error: code = ' + error.code;
+ })
+ .accessibilityUseSamePage(AccessibilitySamePageMode.FULL_SILENT)
+ .width('90%')
+ .height('50%')
+ .backgroundColor('#F0F0F0')
+ .borderRadius(8)
+ .borderWidth(1)
+ .borderColor('#D9D9D9')
+
+ Stack() {
+ Column() {
+ Text('Text 1')
+ .fontSize(18)
+ .fontColor('#2D2D2D')
+ .fontWeight(FontWeight.Medium)
+ Text('Text 1')
+ .fontSize(18)
+ .fontColor('#2D2D2D')
+ .fontWeight(FontWeight.Medium)
+ }
+ .padding({ top: 8, bottom: 8 })
+
+ Column() {
+ Text('Text 2')
+ .fontSize(18)
+ .fontColor('#FFFFFF')
+ .fontWeight(FontWeight.Medium)
+ Text('Text 2')
+ .fontSize(18)
+ .fontColor('#FFFFFF')
+ .fontWeight(FontWeight.Medium)
+ }
+ .backgroundColor('#4A90E2')
+ .padding({
+ left: 12,
+ right: 12,
+ top: 10,
+ bottom: 10
+ })
+ .borderRadius(6)
+ }
+ .width('100%')
+ .margin({ top: 10, bottom: 10 })
+ }
+ .width('100%')
+ .height('100%')
+ .margin({ top: 15 })
+ .accessibilityText($r('app.string.app_name'))
+ .accessibilityDescription($r('app.string.module_desc'))
+ Column() {
+ Text('Text 4')
+ .fontSize(18)
+ .fontWeight(FontWeight.Medium)
+ }
+ .margin({ top: 15 })
+ }
+ .width('100%')
+ }
+ }
+ .accessibilityScrollTriggerable(false)
+ .width('100%')
+ }
+ .height('100%')
+ .backgroundColor('#F7F9FC')
+ }
+}
+```
+
+
diff --git a/en/application-dev/reference/apis-arkui/arkui-ts/ts-universal-attributes-attribute-modifier.md b/en/application-dev/reference/apis-arkui/arkui-ts/ts-universal-attributes-attribute-modifier.md
index c6f432f7b2eee1606b4b300dcea69f664feb2e51..50c21e937e82eddb98c077c988157b0859b35c46 100644
--- a/en/application-dev/reference/apis-arkui/arkui-ts/ts-universal-attributes-attribute-modifier.md
+++ b/en/application-dev/reference/apis-arkui/arkui-ts/ts-universal-attributes-attribute-modifier.md
@@ -12,7 +12,7 @@ With the attribute modifier, you can dynamically set component attributes, compl
## attributeModifier
-attributeModifier(modifier: AttributeModifier\)
+attributeModifier(modifier: AttributeModifier\): T
Creates an attribute modifier.
@@ -24,7 +24,13 @@ Creates an attribute modifier.
| Name | Type | Mandatory| Description |
| -------- | -------------------------------------------- | ---- | -------------------------------------------------------------------------------------------------------------------------------- |
-| modifier | [AttributeModifier\](#attributemodifiert) | Yes | Modifier for dynamically setting attributes on the current component. The **if/else** syntax is supported. **modifier**: attribute modifier. You need a custom class to implement the **AttributeModifier** API.|
+| modifier | [AttributeModifier\](#attributemodifiert) | Yes | Modifier for dynamically setting attributes on the current component. The **if/else** syntax is supported. **modifier**: attribute modifier. You need to customize classes to implement the **AttributeModifier** API.|
+
+**Return value**
+
+| Type| Description|
+| --- | --- |
+| T | Current component.|
## AttributeModifier\
@@ -121,7 +127,7 @@ CommonModifier, ColumnModifier, ColumnSplitModifier, RowModifier, RowSplitModifi
2. Updating the attribute value of a custom modifier changes the corresponding attribute of the component to which the modifier is applied. The custom modifier is a base class, and the constructed object is a child class object. When using the object, use **as** to assert the type as a child class.
3. With a custom modifier applied to two components, updating the attribute value of the custom modifier changes the corresponding attributes of both components.
4. If attributes A and B are set through a custom modifier, and then attributes C and D are set through other means, all the four attributes take effect on the component.
-5. The custom modifier does not support change observation for @State decorated variables. For details, see Example 2.
+5. Custom modifiers do not support change detection of state data decorated with @State. For details, see [Example 3: Understanding Custom Modifiers Do Not Support State Data Changes)](#example-3-understanding-custom-modifiers-do-not-support-state-data-changes).
6. If you use **attributeModifier** to set attributes multiple times, all the set attributes take effect, and those attributes that are set multiple times take effect based on the configuration sequence.
## Example
@@ -132,13 +138,13 @@ This example demonstrates how to switch the background color of a **Button** com
```ts
// xxx.ets
class MyButtonModifier implements AttributeModifier {
- isDark: boolean = false
+ public isDark: boolean = false;
applyNormalAttribute(instance: ButtonAttribute): void {
if (this.isDark) {
- instance.backgroundColor(Color.Black)
+ instance.backgroundColor(Color.Black);
} else {
- instance.backgroundColor(Color.Red)
+ instance.backgroundColor(Color.Red);
}
}
}
@@ -146,7 +152,7 @@ class MyButtonModifier implements AttributeModifier {
@Entry
@Component
struct attributeDemo {
- @State modifier: MyButtonModifier = new MyButtonModifier()
+ @State modifier: MyButtonModifier = new MyButtonModifier();
build() {
Row() {
@@ -154,7 +160,7 @@ struct attributeDemo {
Button("Button")
.attributeModifier(this.modifier)
.onClick(() => {
- this.modifier.isDark = !this.modifier.isDark
+ this.modifier.isDark = !this.modifier.isDark;
})
}
.width('100%')
@@ -173,18 +179,18 @@ This example demonstrates how to implement a pressed state effect for a **Button
// xxx.ets
class MyButtonModifier implements AttributeModifier {
applyNormalAttribute(instance: ButtonAttribute): void {
- instance.backgroundColor(Color.Black)
+ instance.backgroundColor(Color.Black);
}
applyPressedAttribute(instance: ButtonAttribute): void {
- instance.backgroundColor(Color.Red)
+ instance.backgroundColor(Color.Red);
}
}
@Entry
@Component
struct attributePressedDemo {
- @State modifier: MyButtonModifier = new MyButtonModifier()
+ @State modifier: MyButtonModifier = new MyButtonModifier();
build() {
Row() {
@@ -205,7 +211,7 @@ struct attributePressedDemo {
This example shows how to set the width of a custom modifier using state data. Custom modifiers do not support observing changes in data decorated with the @State decorator. Therefore, the width does not change when the button is clicked.
```ts
-import { CommonModifier } from "@kit.ArkUI"
+import { CommonModifier } from "@kit.ArkUI";
const TEST_TAG : string = "AttributeModifier";
class MyModifier extends CommonModifier {
@@ -216,7 +222,7 @@ class MyModifier extends CommonModifier {
@Component
struct MyImage1 {
- @Link modifier: CommonModifier
+ @Link modifier: CommonModifier;
build() {
Image($r("app.media.startIcon")).attributeModifier(this.modifier as MyModifier)
@@ -229,21 +235,21 @@ struct Index {
index: number = 0;
@State width1: number = 100;
@State height1: number = 100;
- @State myModifier: CommonModifier = new MyModifier().width(this.width1).height(this.height1).margin(10)
+ @State myModifier: CommonModifier = new MyModifier().width(this.width1).height(this.height1).margin(10);
build() {
Column() {
Button($r("app.string.EntryAbility_label"))
.margin(10)
.onClick(() => {
- console.log(TEST_TAG, "onClick")
+ console.log(TEST_TAG, "onClick");
this.index++;
if (this.index % 2 === 1) {
this.width1 = 10;
- console.log(TEST_TAG, "setGroup1")
+ console.log(TEST_TAG, "setGroup1");
} else {
this.width1 = 10;
- console.log(TEST_TAG, "setGroup2")
+ console.log(TEST_TAG, "setGroup2");
}
})
MyImage1({ modifier: this.myModifier })
@@ -259,7 +265,7 @@ struct Index {
In this example, the custom modifier sets the **width** and **height** attributes, and the **borderStyle** and **borderWidth** attributes are set through a button click. In this case, all the four attributes take effect when the button is clicked.
```ts
-import { CommonModifier } from "@kit.ArkUI"
+import { CommonModifier } from "@kit.ArkUI";
const TEST_TAG: string = "AttributeModifier";
@@ -269,19 +275,19 @@ class MyModifier extends CommonModifier {
}
public setGroup1(): void {
- this.borderStyle(BorderStyle.Dotted)
- this.borderWidth(8)
+ this.borderStyle(BorderStyle.Dotted);
+ this.borderWidth(8);
}
public setGroup2(): void {
- this.borderStyle(BorderStyle.Dashed)
- this.borderWidth(8)
+ this.borderStyle(BorderStyle.Dashed);
+ this.borderWidth(8);
}
}
@Component
struct MyImage1 {
- @Link modifier: CommonModifier
+ @Link modifier: CommonModifier;
build() {
Image($r("app.media.startIcon")).attributeModifier(this.modifier as MyModifier)
@@ -291,7 +297,7 @@ struct MyImage1 {
@Entry
@Component
struct Index {
- @State myModifier: CommonModifier = new MyModifier().width(100).height(100).margin(10)
+ @State myModifier: CommonModifier = new MyModifier().width(100).height(100).margin(10);
index: number = 0;
build() {
@@ -299,14 +305,14 @@ struct Index {
Button($r("app.string.EntryAbility_label"))
.margin(10)
.onClick(() => {
- console.log(TEST_TAG, "onClick")
+ console.log(TEST_TAG, "onClick");
this.index++;
if (this.index % 2 === 1) {
- (this.myModifier as MyModifier).setGroup1()
- console.log(TEST_TAG, "setGroup1")
+ (this.myModifier as MyModifier).setGroup1();
+ console.log(TEST_TAG, "setGroup1");
} else {
- (this.myModifier as MyModifier).setGroup2()
- console.log(TEST_TAG, "setGroup2")
+ (this.myModifier as MyModifier).setGroup2();
+ console.log(TEST_TAG, "setGroup2");
}
})
MyImage1({ modifier: this.myModifier })
@@ -317,6 +323,131 @@ struct Index {
```

+### Example 5: Setting the Focused State Style with a Modifier
+
+This example demonstrates how to implement a focused state style for a **Button** component by binding it to a modifier. After **Button2** is clicked, the **Button** component displays the focused style when it has focus.
+
+```ts
+class MyButtonModifier implements AttributeModifier {
+
+ applyNormalAttribute(instance: ButtonAttribute): void {
+ instance.backgroundColor(Color.Blue);
+ }
+ applyFocusedAttribute(instance: ButtonAttribute): void {
+ instance.backgroundColor(Color.Green);
+ }
+}
+
+@Entry
+@Component
+struct attributeDemo {
+ @State modifier: MyButtonModifier = new MyButtonModifier();
+ @State isDisable: boolean = true;
+
+ build() {
+ Row() {
+ Column() {
+ Button("Button")
+ .attributeModifier(this.modifier)
+ .enabled(this.isDisable)
+ .id("app")
+ Divider().vertical(false).strokeWidth(15).color(Color.Transparent)
+ Button("Button2")
+ .onClick(() => {
+ this.getUIContext().getFocusController().activate(true);
+ this.getUIContext().getFocusController().requestFocus("app");
+ })
+ }
+ .width('100%')
+ }
+ .height('100%')
+ }
+}
+```
+
+
+### Example 6: Setting the Disabled State Style with a Modifier
+
+This example demonstrates how to implement a disabled state style for a **Button** component by binding it to a modifier. After **Button2** is clicked, the **Button** component displays the disabled style when it is disabled.
+
+```ts
+class MyButtonModifier implements AttributeModifier {
+ applyDisabledAttribute(instance: ButtonAttribute): void {
+ instance.width(200);
+ }
+}
+
+@Entry
+@Component
+struct attributeDemo {
+ @State modifier: MyButtonModifier = new MyButtonModifier();
+ @State isDisable: boolean = true;
+
+ build() {
+ Row() {
+ Column() {
+ Button("Button")
+ .attributeModifier(this.modifier)
+ .enabled(this.isDisable)
+ Divider().vertical(false).strokeWidth(15).color(Color.Transparent)
+ Button("Button2")
+ .onClick(() => {
+ this.isDisable = !this.isDisable;
+ })
+ }
+ .width('100%')
+ }
+ .height('100%')
+ }
+}
+```
+
+
+### Example 7: Setting the Selected State Style with a Modifier
+
+This example demonstrates how to implement a selected state style for a **Radio** component by binding it to a modifier.
+
+```ts
+class MyRadioModifier implements AttributeModifier {
+ applyNormalAttribute(instance: RadioAttribute): void {
+ instance.backgroundColor(Color.Blue);
+ }
+ applySelectedAttribute(instance: RadioAttribute): void {
+ instance.backgroundColor(Color.Red);
+ instance.borderWidth(2);
+ }
+}
+
+@Entry
+@Component
+struct attributeDemo {
+ @State modifier: MyRadioModifier = new MyRadioModifier();
+ @State value: boolean = false;
+ @State value2: boolean = false;
+
+ build() {
+ Row() {
+ Column() {
+ Radio({ value: 'Radio1', group: 'radioGroup1' })
+ .checked(this.value)
+ .height(50)
+ .width(50)
+ .borderWidth(0)
+ .borderRadius(30)
+ .onClick(() => {
+ this.value = !this.value;
+ })
+ .attributeModifier(this.modifier)
+ }
+ .width('100%')
+ }
+ .height('100%')
+ }
+}
+```
+
+
+
## Supported Scope of Attributes
Attributes not listed in the table below are supported by default.
diff --git a/en/application-dev/reference/apis-arkui/arkui-ts/ts-universal-attributes-content-modifier.md b/en/application-dev/reference/apis-arkui/arkui-ts/ts-universal-attributes-content-modifier.md
index 9d758d2a57bf1d7fe808c01d51c5e45b8e1e0517..c36a9992460341c2489de2a4c58ff749820ae1d8 100644
--- a/en/application-dev/reference/apis-arkui/arkui-ts/ts-universal-attributes-content-modifier.md
+++ b/en/application-dev/reference/apis-arkui/arkui-ts/ts-universal-attributes-content-modifier.md
@@ -2,13 +2,13 @@
You can apply a content modifier to a component to customize its content area using a style builder.
-> **NOTE**
+> **NOTE**
>
-> This feature is supported since API version 12. Updates will be marked with a superscript to indicate their earliest API version.
+> The initial APIs of this module are supported since API version 12. Updates will be marked with a superscript to indicate their earliest API version.
## contentModifier
-contentModifier(modifier:ContentModifier\)
+contentModifier(modifier: ContentModifier\): T
Creates a content modifier.
@@ -16,9 +16,15 @@ Creates a content modifier.
**Parameters**
-| Name | Type | Mandatory | Description |
+| Name | Type | Mandatory| Description |
| -------- | ------------------ | ---- | ------------------------------------------------------------ |
-| modifier | ContentModifier\ | Yes | Content modifier to apply to the current component. **modifier**: content modifier. You need a custom class to implement the **ContentModifier** API. |
+| modifier | ContentModifier\ | Yes | Content modifier to apply to the current component. **modifier**: content modifier. You need a custom class to implement the **ContentModifier** API.|
+
+**Return value**
+
+| Type| Description|
+| --- | --- |
+| T | Current component.|
## ContentModifier\
@@ -26,7 +32,7 @@ You need a custom class to implement the **ContentModifier** API.
### applyContent
-applyContent() : WrappedBuilder<[T]>
+applyContent(): WrappedBuilder<[T]>
Builder of the custom content area.
@@ -36,9 +42,9 @@ Builder of the custom content area.
**Parameters**
-| Name | Description |
+| Name| Description |
| ---- | ------------------------------------------------------------ |
-| T | Component attribute class, which is used to distinguish different information required by different components after content areas are customized, for example, **ButtonConfiguration** for the **Button** component and **CheckBoxConfiguration** of the **Checkbox** component. |
+| T | Component attribute class, which is used to distinguish different information required by different components after content areas are customized, for example, **ButtonConfiguration** for the **Button** component and **CheckBoxConfiguration** of the **Checkbox** component.|
**Value range of the T parameter:**
@@ -68,21 +74,21 @@ This example demonstrates how to create a custom check box using **ContentModifi
```ts
// xxx.ets
class MyCheckboxStyle implements ContentModifier {
- selectedColor: Color = Color.White
+ selectedColor: Color = Color.White;
constructor(selectedColor: Color) {
this.selectedColor = selectedColor;
}
applyContent(): WrappedBuilder<[CheckBoxConfiguration]> {
- return wrapBuilder(buildCheckbox)
+ return wrapBuilder(buildCheckbox);
}
}
@Builder
function buildCheckbox(config: CheckBoxConfiguration) {
Column({ space: 10 }) {
- Text(config.name + (config.selected ? "(Selected)" : "(Not selected)"))
+ Text(config.name + (config.selected ? "(Selected)" : ""(Not selected)"))
Shape() {
// Pentagon check box style
Path()
@@ -114,9 +120,9 @@ function buildCheckbox(config: CheckBoxConfiguration) {
.onClick(() => {
// Trigger the check box state change upon click.
if (config.selected) {
- config.triggerChange(false)
+ config.triggerChange(false);
} else {
- config.triggerChange(true)
+ config.triggerChange(true);
}
})
.margin({ left: 150 })
@@ -133,7 +139,7 @@ struct Index {
.select(true)
.contentModifier(new MyCheckboxStyle(Color.Red))
.onChange((value: boolean) => {
- console.info('Checkbox change is' + value)
+ console.info('Checkbox change is' + value);
})
}
.width('100%')
diff --git a/en/application-dev/reference/apis-arkui/arkui-ts/ts-universal-attributes-custom-property.md b/en/application-dev/reference/apis-arkui/arkui-ts/ts-universal-attributes-custom-property.md
index 795df1346efcddc9f5a1a949ee98c762537bce43..0fd9c588f9764e059a2c94b3dc1e6a11e9dba2e9 100644
--- a/en/application-dev/reference/apis-arkui/arkui-ts/ts-universal-attributes-custom-property.md
+++ b/en/application-dev/reference/apis-arkui/arkui-ts/ts-universal-attributes-custom-property.md
@@ -8,7 +8,7 @@ You can set custom properties on components. These custom properties can be obta
## customProperty
-customProperty(name: string, value: Optional\