From 530fd7f9dcbcb6105fe670bd366f84b2a5bb4e1e Mon Sep 17 00:00:00 2001 From: zhanghang Date: Thu, 15 May 2025 14:11:34 +0800 Subject: [PATCH] The step point of Slider supports to set the accessibility info Signed-off-by: zhanghang --- api/@internal/component/ets/slider.d.ts | 58 +++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/api/@internal/component/ets/slider.d.ts b/api/@internal/component/ets/slider.d.ts index 2ecd48ceb7..481752c275 100644 --- a/api/@internal/component/ets/slider.d.ts +++ b/api/@internal/component/ets/slider.d.ts @@ -990,6 +990,50 @@ interface SliderInterface { (options?: SliderOptions): SliderAttribute; } +/** + * Defines the accessibility information of slider step point. + * + * @interface SliderStepItemAccessibility + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +declare interface SliderStepItemAccessibility { + /** + * Set the accessibility of the slider step point. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + text?: ResourceStr; +} + +/** + * Defines the accessibility information of slider step point. + * + * @interface SliderShowStepOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +declare interface SliderShowStepOptions { + /** + * Set the accessibility of the slider step points. + * + * @type { ?Map } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + stepsAccessibility?: Map; +} + /** * Defines the options for customizing the accessibility of content within a slider. * These options can be used to enhance the user experience for assistive technologies. @@ -1319,6 +1363,20 @@ declare class SliderAttribute extends CommonMethod { */ showSteps(value: boolean): SliderAttribute; + /** + * Called when setting whether to display step size. + * + * @param { boolean } value + * @param { SliderShowStepOptions } options + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + showSteps(value: boolean, options?: SliderShowStepOptions): SliderAttribute; + /** * Called when the percentage of bubble prompt is set when sliding. * -- Gitee