diff --git a/en/application-dev/reference/apis/js-apis-accessibility.md b/en/application-dev/reference/apis/js-apis-accessibility.md index 2f92eaaf3052bd34f76baefc6a04de7a8d59b4a4..12d03127205e38c462aeaa275f286adecf0fe34e 100644 --- a/en/application-dev/reference/apis/js-apis-accessibility.md +++ b/en/application-dev/reference/apis/js-apis-accessibility.md @@ -137,11 +137,11 @@ Describes the style of captions. | Name | Type | Readable | Writable | Description | | --------------- | ---------------------------------------- | ---- | ---- | ----------- | | fontFamily | [CaptionsFontFamily](#captionsfontfamily8) | Yes | No | Font family of captions. | -| fontScale | number | Yes | No | Font scale of captions.| -| fontColor | number \| string | Yes | No | Font color of captions. | +| fontScale | number | Yes | No | Font scale factor of captions, in percentage. The value ranges from 1 to 200.| +| fontColor | number \| string | Yes | No | Font color of captions. For example, red corresponds to #FF0000. | | fontEdgeType | [CaptionsFontEdgeType](#captionsfontedgetype8) | Yes | No | Font edge type of captions. | -| backgroundColor | number \| string | Yes | No | Background color of captions. | -| windowColor | number \| string | Yes | No | Window color of captions. | +| backgroundColor | number \| string | Yes | No | Background color of captions. For example, red corresponds to #FF0000. | +| windowColor | number \| string | Yes | No | Window color of captions. For example, red corresponds to #FF0000. | ## CaptionsManager8+ @@ -162,6 +162,8 @@ on(type: 'enableChange', callback: Callback<boolean>): void; Enables listening for the enabled status changes of captions configuration. This API uses an asynchronous callback to return the result. +**System capability**: SystemCapability.BarrierFree.Accessibility.Hearing + **Parameters** | Name | Type | Mandatory | Description | @@ -188,6 +190,8 @@ on(type: 'styleChange', callback: Callback<CaptionsStyle>): void; Enables listening for captions style changes. This API uses an asynchronous callback to return the result. +**System capability**: SystemCapability.BarrierFree.Accessibility.Hearing + **Parameters** | Name | Type | Mandatory | Description | @@ -216,6 +220,8 @@ off(type: 'enableChange', callback?: Callback<boolean>): void; Disables listening for the enabled status changes of captions configuration. This API uses an asynchronous callback to return the result. +**System capability**: SystemCapability.BarrierFree.Accessibility.Hearing + **Parameters** | Name | Type | Mandatory | Description | @@ -242,6 +248,8 @@ off(type: 'styleChange', callback?: Callback<CaptionsStyle>): void; Disables listening for captions style changes. This API uses an asynchronous callback to return the result. +**System capability**: SystemCapability.BarrierFree.Accessibility.Hearing + **Parameters** | Name | Type | Mandatory | Description | @@ -573,7 +581,7 @@ on(type: 'accessibilityStateChange', callback: Callback<boolean>): void Enables listening for the enabled status changes of the accessibility application. This API uses an asynchronous callback to return the result. - +**System capability**: SystemCapability.BarrierFree.Accessibility.Core **Parameters** @@ -600,7 +608,7 @@ on(type: 'touchGuideStateChange', callback: Callback<boolean>): void Enables listening for the enabled status changes of the touch guide mode. This API uses an asynchronous callback to return the result. - +**System capability**: SystemCapability.BarrierFree.Accessibility.Vision **Parameters** @@ -627,13 +635,13 @@ off(type: 'accessibilityStateChange', callback?: Callback<boolean>): void Disables listening for the enabled status changes of the accessibility application. This API uses an asynchronous callback to return the result. - +**System capability**: SystemCapability.BarrierFree.Accessibility.Core **Parameters** | Name | Type | Mandatory | Description | | -------- | ----------------------- | ---- | ---------------------------------------- | -| type | string | No | Type of the event to listen for, which is set to **'accessibilityStateChange'** in this API.| +| type | string | Yes | Type of the event to listen for, which is set to **'accessibilityStateChange'** in this API.| | callback | Callback<boolean> | No | Callback for the event. | **Example** @@ -654,13 +662,13 @@ off(type: 'touchGuideStateChange', callback?: Callback<boolean>): void Disables listening for the enabled status changes of the touch guide mode. This API uses an asynchronous callback to return the result. - +**System capability**: SystemCapability.BarrierFree.Accessibility.Core **Parameters** | Name | Type | Mandatory | Description | | -------- | ----------------------- | ---- | ---------------------------------------- | -| type | string | No | Type of the event to listen for, which is set to **'touchGuideStateChange'** in this API.| +| type | string | Yes | Type of the event to listen for, which is set to **'touchGuideStateChange'** in this API.| | callback | Callback<boolean> | No | Callback for the event. | **Example** diff --git a/en/application-dev/reference/apis/js-apis-inner-application-accessibilityExtensionContext.md b/en/application-dev/reference/apis/js-apis-inner-application-accessibilityExtensionContext.md index 4f94686f60f8964beac0159a44a476c13904ce52..998c4b61c624a7022d41de924b93603e31c7c003 100644 --- a/en/application-dev/reference/apis/js-apis-inner-application-accessibilityExtensionContext.md +++ b/en/application-dev/reference/apis/js-apis-inner-application-accessibilityExtensionContext.md @@ -241,6 +241,14 @@ Obtains the focus element. This API uses an asynchronous callback to return the | isAccessibilityFocus | boolean | Yes | Whether the obtained focus element is an accessibility focus. | | callback | AsyncCallback<AccessibilityElement> | Yes | Callback used to return the current focus element.| +**Error codes** + +For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md). + +| ID | Error Message | +| ------- | ---------------------------------------- | +| 9300003 | Do not have accessibility right for this operation. | + **Example** ```ts diff --git a/en/application-dev/reference/arkui-ts/ts-container-alphabet-indexer.md b/en/application-dev/reference/arkui-ts/ts-container-alphabet-indexer.md index df19454da7610c2d52acfd958c7c35e0e3073e33..e25ebce13a72fc5f7977b8dde2fded7d18f42952 100644 --- a/en/application-dev/reference/arkui-ts/ts-container-alphabet-indexer.md +++ b/en/application-dev/reference/arkui-ts/ts-container-alphabet-indexer.md @@ -39,7 +39,7 @@ In addition to the [universal attributes](ts-universal-attributes-size.md), the | popupFont | [Font](ts-types.md#font) | Font style of the pop-up text.
Default value:
{
size:10,
style:FontStyle.Normal,
weight:FontWeight.Normal,
family:'HarmonyOS Sans'
} | | font | [Font](ts-types.md#font) | Default font style of the alphabetic index bar.
Default value:
{
size:10,
style:FontStyle.Normal,
weight:FontWeight.Normal,
family:'HarmonyOS Sans'
} | | itemSize | string \| number | Size of an item in the alphabetic index bar. The item is a square, and the side length needs to be set. This attribute cannot be set to a percentage.
Default value: **24.0**
Unit: vp| -| alignStyle | value: [IndexerAlign](#indexeralign),
offset10+?: [Length](ts-types.md#length) | Alignment style of the alphabetic index bar.
**value**: alignment of the alphabetic index bar with the pop-up window, which can be left-aligned or right-aligned.
Default value: **IndexerAlign.Right**
**offset**: spacing between the pop-up window and the alphabetic index bar. A value greater than or equal to 0 is valid. If this attribute is set to a value less than 0 or is not set, the spacing is the same as **popupPosition.x**.| +| alignStyle | value: [IndexerAlign](#indexeralign),
offset10+?: [Length](ts-types.md#length) | Alignment style of the alphabetic index bar.
**value**: alignment of the alphabetic index bar with the pop-up window, which can be left-aligned or right-aligned.
Default value: **IndexerAlign.Right**
**offset**: spacing between the pop-up window and the alphabetic index bar. A value greater than or equal to 0 is valid. If this parameter is set to a value less than 0 or is not set, the spacing is the same as **popupPosition.x**. If this parameter and **popupPosition** are set at the same time, **offset** takes effect in the horizontal direction and **popupPosition.y** takes effect in the vertical direction.| | selected | number | Index of the selected item.
Default value: **0**
Since API version 10, this parameter supports [$$](../../quick-start/arkts-two-way-sync.md) for two-way binding of variables.| | popupPosition | [Position](ts-types.md#position8) | Position of the pop-up window relative to the center of the indexer bar's top border.
Default value: **{x:96.0, y:48.0}**| | popupSelectedColor10+ | [ResourceColor](ts-types.md#resourcecolor) | Color of the selected text excluding the initial letter in the pop-up window.
Default value: **#FF182431**| @@ -139,6 +139,10 @@ struct AlphabetIndexerSample { .popupFont({ size: 30, weight: FontWeight.Bolder}) // Font style of the pop-up text. .itemSize(28) // Size of an item in the alphabetic index bar. .alignStyle(IndexerAlign.Left) // The pop-up window is displayed on the right of the alphabetic index bar. + .popupSelectedColor(0x00FF00) + .popupUnselectedColor(0x0000FF) + .popupItemFont({ size: 30, style: FontStyle.Normal }) + .popupItemBackgroundColor(0xCCCCCC) .onSelect((index: number) => { console.info(this.value[index] + ' Selected!') })