1/* 2 * Copyright (C) 2021-2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16import type { AsyncCallback } from './basic'; 17import type { Callback } from './basic'; 18 19/** 20 * Accessibility 21 * 22 * @namespace accessibility 23 * @syscap SystemCapability.BarrierFree.Accessibility.Core 24 * @since 7 25 */ 26declare namespace accessibility { 27 /** 28 * The type of the Ability app. 29 * 30 * @type { 'audible' | 'generic' | 'haptic' | 'spoken' | 'visual' } 31 * @syscap SystemCapability.BarrierFree.Accessibility.Core 32 * @since 7 33 */ 34 /** 35 * The type of the Ability app. 36 * 37 * @type { 'audible' | 'generic' | 'haptic' | 'spoken' | 'visual' | 'all' } 38 * @syscap SystemCapability.BarrierFree.Accessibility.Core 39 * @since 9 40 */ 41 type AbilityType = 'audible' | 'generic' | 'haptic' | 'spoken' | 'visual' | 'all'; 42 43 /** 44 * The action that the ability can execute. 45 * 46 * @syscap SystemCapability.BarrierFree.Accessibility.Core 47 * @since 7 48 */ 49 type Action = 'accessibilityFocus' | 'clearAccessibilityFocus' | 'focus' | 'clearFocus' | 'clearSelection' | 50 'click' | 'longClick' | 'cut' | 'copy' | 'paste' | 'select' | 'setText' | 'delete' | 51 'scrollForward' | 'scrollBackward' | 'setSelection' | 'setCursorPosition' | 'common'; 52 53 /** 54 * The type of the accessibility event. 55 * windowsChange/windowContentChange/windowStateChange/announcement/notificationChange/textTraversedAtMove 56 * 57 * @syscap SystemCapability.BarrierFree.Accessibility.Core 58 * @since 7 59 */ 60 type EventType = 'accessibilityFocus' | 'accessibilityFocusClear' | 61 'click' | 'longClick' | 'focus' | 'select' | 'hoverEnter' | 'hoverExit' | 62 'textUpdate' | 'textSelectionUpdate' | 'scroll' | 'requestFocusForAccessibility' | 'announceForAccessibility'; 63 64 /** 65 * The change type of the windowsChange event. 66 * It's used when received the {@code windowsChange} event. 67 * 68 * @syscap SystemCapability.BarrierFree.Accessibility.Core 69 * @since 7 70 */ 71 type WindowUpdateType = 'add' | 'remove' | 'bounds' | 'active' | 'focus'; 72 73 /** 74 * The type of the ability state. 75 * 76 * @syscap SystemCapability.BarrierFree.Accessibility.Core 77 * @since 7 78 */ 79 type AbilityState = 'enable' | 'disable' | 'install'; 80 81 /** 82 * The ability that accessibility subsystem support. 83 * touchExplorer: Describes the capability to talkback. 84 * magnification: Describes the capability to request to control the display magnification. 85 * gesturesSimulation: Describes the capability to request to simulate the gesture. 86 * windowContent: Describes the capability to search for the content of the active window. 87 * filterKeyEvents: Describes the capability to request to filter key events. 88 * fingerprintGesture: Describes the capability to request to fingerprint gesture. 89 * 90 * @syscap SystemCapability.BarrierFree.Accessibility.Core 91 * @since 7 92 */ 93 type Capability = 'retrieve' | 'touchGuide' | 'keyEventObserver' | 'zoom' | 'gesture'; 94 95 /** 96 * The granularity of text move. 97 * 98 * @syscap SystemCapability.BarrierFree.Accessibility.Core 99 * @since 7 100 */ 101 type TextMoveUnit = 'char' | 'word' | 'line' | 'page' | 'paragraph'; 102 103 /** 104 * Checks whether accessibility ability is enabled. 105 * 106 * @param { AsyncCallback<boolean> } callback Asynchronous callback interface. 107 * @syscap SystemCapability.BarrierFree.Accessibility.Core 108 * @since 7 109 * @deprecated since 10 110 * @useinstead ohos.accessibility#isOpenAccessibilitySync 111 */ 112 function isOpenAccessibility(callback: AsyncCallback<boolean>): void; 113 114 /** 115 * Checks whether accessibility ability is enabled. 116 * 117 * @returns { Promise<boolean> } Returns {@code true} if the accessibility is enabled; returns {@code false} otherwise. 118 * @syscap SystemCapability.BarrierFree.Accessibility.Core 119 * @since 7 120 * @deprecated since 10 121 * @useinstead ohos.accessibility#isOpenAccessibilitySync 122 */ 123 function isOpenAccessibility(): Promise<boolean>; 124 125 /** 126 * Checks whether accessibility ability is enabled. 127 * 128 * @returns { boolean } Returns true if the accessibility is enabled; returns false otherwise. 129 * @syscap SystemCapability.BarrierFree.Accessibility.Core 130 * @since 10 131 */ 132 function isOpenAccessibilitySync(): boolean; 133 134 /** 135 * Checks touch browser ability (which is used by talkback) is enabled. 136 * 137 * @param { AsyncCallback<boolean> } callback Asynchronous callback interface. 138 * @syscap SystemCapability.BarrierFree.Accessibility.Vision 139 * @since 7 140 * @deprecated since 10 141 * @useinstead ohos.accessibility#isOpenTouchGuideSync 142 */ 143 function isOpenTouchGuide(callback: AsyncCallback<boolean>): void; 144 145 /** 146 * Checks touch browser ability (which is used by talkback) is enabled. 147 * 148 * @returns { Promise<boolean> } Returns {@code true} if the touch browser is enabled; returns {@code false} otherwise. 149 * @syscap SystemCapability.BarrierFree.Accessibility.Vision 150 * @since 7 151 * @deprecated since 10 152 * @useinstead ohos.accessibility#isOpenTouchGuideSync 153 */ 154 function isOpenTouchGuide(): Promise<boolean>; 155 156 /** 157 * Checks touch browser ability (which is used by talkback) is enabled. 158 * 159 * @returns { boolean } Returns true if the touch browser is enabled; returns false otherwise. 160 * @syscap SystemCapability.BarrierFree.Accessibility.Vision 161 * @since 10 162 */ 163 function isOpenTouchGuideSync(): boolean; 164 165 /** 166 * Queries the list of accessibility abilities. 167 * 168 * @param { AbilityType } abilityType The type of the accessibility ability. {@code AbilityType} eg.spoken 169 * @param { AbilityState } stateType The state of the accessibility ability. {@code AbilityState} eg.installed 170 * @param { AsyncCallback<Array<AccessibilityAbilityInfo>> } callback 171 * @syscap SystemCapability.BarrierFree.Accessibility.Core 172 * @since 7 173 * @deprecated since 9 174 */ 175 function getAbilityLists( 176 abilityType: AbilityType, 177 stateType: AbilityState, 178 callback: AsyncCallback<Array<AccessibilityAbilityInfo>> 179 ): void; 180 181 /** 182 * Queries the list of accessibility abilities. 183 * 184 * @param { AbilityType } abilityType The type of the accessibility ability. {@code AbilityType} eg.spoken 185 * @param { AbilityState } stateType The state of the accessibility ability. {@code AbilityState} eg.installed 186 * @returns { Promise<Array<AccessibilityAbilityInfo>> } Returns the list of abilityInfos. 187 * @syscap SystemCapability.BarrierFree.Accessibility.Core 188 * @since 7 189 * @deprecated since 9 190 */ 191 function getAbilityLists(abilityType: AbilityType, stateType: AbilityState): Promise<Array<AccessibilityAbilityInfo>>; 192 193 /** 194 * Queries the list of accessibility abilities. 195 * 196 * @param { AbilityType } abilityType The type of the accessibility ability. {@code AbilityType} eg.spoken 197 * @param { AbilityState } stateType The state of the accessibility ability. {@code AbilityState} eg.installed 198 * @returns { Promise<Array<AccessibilityAbilityInfo>> } Returns the list of abilityInfos. 199 * @throws { BusinessError } 401 - Parameter error. Possible causes: 200 * 1. Mandatory parameters are left unspecified; 201 * 2. Incorrect parameter types; 202 * 3. Parameter verification failed. 203 * @syscap SystemCapability.BarrierFree.Accessibility.Core 204 * @since 9 205 */ 206 function getAccessibilityExtensionList( 207 abilityType: AbilityType, 208 stateType: AbilityState 209 ): Promise<Array<AccessibilityAbilityInfo>>; 210 211 /** 212 * Queries the list of accessibility abilities. 213 * 214 * @param { AbilityType } abilityType The type of the accessibility ability. {@code AbilityType} eg.spoken 215 * @param { AbilityState } stateType The state of the accessibility ability. {@code AbilityState} eg.installed 216 * @param { AsyncCallback<Array<AccessibilityAbilityInfo>> } callback 217 * @throws { BusinessError } 401 - Parameter error. Possible causes: 218 * 1. Mandatory parameters are left unspecified; 219 * 2. Incorrect parameter types; 220 * 3. Parameter verification failed. 221 * @syscap SystemCapability.BarrierFree.Accessibility.Core 222 * @since 9 223 */ 224 function getAccessibilityExtensionList( 225 abilityType: AbilityType, 226 stateType: AbilityState, 227 callback: AsyncCallback<Array<AccessibilityAbilityInfo>> 228 ): void; 229 230 /** 231 * Queries the list of accessibility abilities. 232 * 233 * @param { AbilityType } abilityType The type of the accessibility ability. {@code AbilityType} eg.spoken 234 * @param { AbilityState } stateType The state of the accessibility ability. {@code AbilityState} eg.installed 235 * @returns { Array<AccessibilityAbilityInfo> } Returns the list of abilityInfos. 236 * @throws { BusinessError } 401 - Parameter error. Possible causes: 237 * 1. Mandatory parameters are left unspecified; 238 * 2. Incorrect parameter types; 239 * 3. Parameter verification failed. 240 * @syscap SystemCapability.BarrierFree.Accessibility.Core 241 * @since 12 242 */ 243 function getAccessibilityExtensionListSync( 244 abilityType: AbilityType, 245 stateType: AbilityState 246 ): Array<AccessibilityAbilityInfo>; 247 248 /** 249 * Send accessibility Event. 250 * 251 * @param { EventInfo } event The object of the accessibility {@code EventInfo} . 252 * @param { AsyncCallback<void> } callback Asynchronous callback interface. 253 * @syscap SystemCapability.BarrierFree.Accessibility.Core 254 * @since 7 255 * @deprecated since 9 256 */ 257 function sendEvent(event: EventInfo, callback: AsyncCallback<void>): void; 258 259 /** 260 * Send accessibility Event. 261 * 262 * @param { EventInfo } event The object of the accessibility {@code EventInfo} . 263 * @returns { Promise<void> } Returns {@code true} if success ; returns {@code false} otherwise. 264 * @syscap SystemCapability.BarrierFree.Accessibility.Core 265 * @since 7 266 * @deprecated since 9 267 */ 268 function sendEvent(event: EventInfo): Promise<void>; 269 270 /** 271 * Send accessibility event. 272 * 273 * @param { EventInfo } event The object of the accessibility {@code EventInfo} . 274 * @param { AsyncCallback<void> } callback Asynchronous callback interface. 275 * @throws { BusinessError } 401 - Parameter error. Possible causes: 276 * 1. Mandatory parameters are left unspecified; 277 * 2. Incorrect parameter types; 278 * 3. Parameter verification failed. 279 * @syscap SystemCapability.BarrierFree.Accessibility.Core 280 * @since 9 281 */ 282 function sendAccessibilityEvent(event: EventInfo, callback: AsyncCallback<void>): void; 283 284 /** 285 * Send accessibility event. 286 * 287 * @param { EventInfo } event The object of the accessibility {@code EventInfo} . 288 * @returns { Promise<void> } Returns {@code true} if success ; returns {@code false} otherwise. 289 * @throws { BusinessError } 401 - Parameter error. Possible causes: 290 * 1. Mandatory parameters are left unspecified; 291 * 2. Incorrect parameter types; 292 * 3. Parameter verification failed. 293 * @syscap SystemCapability.BarrierFree.Accessibility.Core 294 * @since 9 295 */ 296 function sendAccessibilityEvent(event: EventInfo): Promise<void>; 297 298 /** 299 * Register the observe of the accessibility state changed. 300 * 301 * @param { 'accessibilityStateChange' } type state event type. 302 * @param { Callback<boolean> } callback Asynchronous callback interface. 303 * @throws { BusinessError } 401 - Parameter error. Possible causes: 304 * 1. Mandatory parameters are left unspecified; 305 * 2. Incorrect parameter types; 306 * 3. Parameter verification failed. 307 * @syscap SystemCapability.BarrierFree.Accessibility.Core 308 * @since 7 309 */ 310 function on(type: 'accessibilityStateChange', callback: Callback<boolean>): void; 311 312 /** 313 * Register the observe of the touchGuide state changed. 314 * 315 * @param { 'touchGuideStateChange' } type state event type. 316 * @param { Callback<boolean> } callback Asynchronous callback interface. 317 * @throws { BusinessError } 401 - Parameter error. Possible causes: 318 * 1. Mandatory parameters are left unspecified; 319 * 2. Incorrect parameter types; 320 * 3. Parameter verification failed. 321 * @syscap SystemCapability.BarrierFree.Accessibility.Vision 322 * @since 7 323 */ 324 function on(type: 'touchGuideStateChange', callback: Callback<boolean>): void; 325 326 /** 327 * Deregister the observe of the accessibility state changed. 328 * 329 * @param { 'accessibilityStateChange' } type state event type 330 * @param { Callback<boolean> } callback Asynchronous callback interface. 331 * @throws { BusinessError } 401 - Parameter error. Possible causes: 332 * 1. Mandatory parameters are left unspecified; 333 * 2. Incorrect parameter types; 334 * 3. Parameter verification failed. 335 * @syscap SystemCapability.BarrierFree.Accessibility.Core 336 * @since 7 337 */ 338 function off(type: 'accessibilityStateChange', callback?: Callback<boolean>): void; 339 340 /** 341 * Deregister the observe of the touchGuide state changed. 342 * 343 * @param { 'touchGuideStateChange' } type state event type 344 * @param { Callback<boolean> } callback Asynchronous callback interface. 345 * @throws { BusinessError } 401 - Parameter error. Possible causes: 346 * 1. Mandatory parameters are left unspecified; 347 * 2. Incorrect parameter types; 348 * 3. Parameter verification failed. 349 * @syscap SystemCapability.BarrierFree.Accessibility.Core 350 * @since 7 351 */ 352 function off(type: 'touchGuideStateChange', callback?: Callback<boolean>): void; 353 354 /** 355 * Get the captions manager. 356 * 357 * @returns { CaptionsManager } Returns the captions manager. 358 * @syscap SystemCapability.BarrierFree.Accessibility.Hearing 359 * @since 8 360 */ 361 function getCaptionsManager(): CaptionsManager; 362 363 /** 364 * Indicates the captions manager. 365 * 366 * @typedef CaptionsManager 367 * @syscap SystemCapability.BarrierFree.Accessibility.Hearing 368 * @since 8 369 */ 370 interface CaptionsManager { 371 /** 372 * Indicates whether captions are enabled. 373 * 374 * @syscap SystemCapability.BarrierFree.Accessibility.Hearing 375 * @since 8 376 */ 377 enabled: boolean; 378 /** 379 * Indicates the style of captions. 380 * 381 * @syscap SystemCapability.BarrierFree.Accessibility.Hearing 382 * @since 8 383 */ 384 style: CaptionsStyle; 385 386 /** 387 * Register the observe of the enable state. 388 * 389 * @param { 'enableChange' } type 390 * @param { Callback<boolean> } callback 391 * @throws { BusinessError } 401 - Parameter error. Possible causes: 392 * 1. Mandatory parameters are left unspecified; 393 * 2. Incorrect parameter types; 394 * 3. Parameter verification failed. 395 * @syscap SystemCapability.BarrierFree.Accessibility.Hearing 396 * @since 8 397 */ 398 on(type: 'enableChange', callback: Callback<boolean>): void; 399 400 /** 401 * Register the observer of the style. 402 * 403 * @param { 'styleChange' } type 404 * @param { Callback<CaptionsStyle> } callback 405 * @throws { BusinessError } 401 - Parameter error. Possible causes: 406 * 1. Mandatory parameters are left unspecified; 407 * 2. Incorrect parameter types; 408 * 3. Parameter verification failed. 409 * @syscap SystemCapability.BarrierFree.Accessibility.Hearing 410 * @since 8 411 */ 412 on(type: 'styleChange', callback: Callback<CaptionsStyle>): void; 413 414 /** 415 * Deregister the observe of the enable state. 416 * 417 * @param { 'enableChange' } type 418 * @param { Callback<boolean> } callback 419 * @throws { BusinessError } 401 - Parameter error. Possible causes: 420 * 1. Mandatory parameters are left unspecified; 421 * 2. Incorrect parameter types; 422 * 3. Parameter verification failed. 423 * @syscap SystemCapability.BarrierFree.Accessibility.Hearing 424 * @since 8 425 */ 426 off(type: 'enableChange', callback?: Callback<boolean>): void; 427 428 /** 429 * Deregister the observer of the style. 430 * 431 * @param { 'styleChange' } type 432 * @param { Callback<CaptionsStyle> } callback 433 * @throws { BusinessError } 401 - Parameter error. Possible causes: 434 * 1. Mandatory parameters are left unspecified; 435 * 2. Incorrect parameter types; 436 * 3. Parameter verification failed. 437 * @syscap SystemCapability.BarrierFree.Accessibility.Hearing 438 * @since 8 439 */ 440 off(type: 'styleChange', callback?: Callback<CaptionsStyle>): void; 441 } 442 443 /** 444 * Indicates the edge type of the captions font. 445 * 446 * @syscap SystemCapability.BarrierFree.Accessibility.Hearing 447 * @since 8 448 */ 449 type CaptionsFontEdgeType = 'none' | 'raised' | 'depressed' | 'uniform' | 'dropShadow'; 450 /** 451 * Indicates the font family of captions. 452 * 453 * @syscap SystemCapability.BarrierFree.Accessibility.Hearing 454 * @since 8 455 */ 456 type CaptionsFontFamily = 'default' | 'monospacedSerif' | 'serif' | 457 'monospacedSansSerif' | 'sansSerif' | 'casual' | 'cursive' | 'smallCapitals'; 458 /** 459 * Indicates the style of captions. 460 * 461 * @typedef CaptionsStyle 462 * @syscap SystemCapability.BarrierFree.Accessibility.Hearing 463 * @since 8 464 */ 465 interface CaptionsStyle { 466 /** 467 * Indicates the font family of captions. 468 * 469 * @syscap SystemCapability.BarrierFree.Accessibility.Hearing 470 * @since 8 471 */ 472 fontFamily: CaptionsFontFamily; 473 /** 474 * Indicates the font scaling of captions. 475 * 476 * @syscap SystemCapability.BarrierFree.Accessibility.Hearing 477 * @since 8 478 */ 479 fontScale: number; 480 /** 481 * Indicates the font color of captions. 482 * 483 * @syscap SystemCapability.BarrierFree.Accessibility.Hearing 484 * @since 8 485 */ 486 fontColor: number | string; 487 /** 488 * Indicates the edge type of the captions font. 489 * 490 * @syscap SystemCapability.BarrierFree.Accessibility.Hearing 491 * @since 8 492 */ 493 fontEdgeType: CaptionsFontEdgeType; 494 /** 495 * Indicates the background color of captions. 496 * 497 * @syscap SystemCapability.BarrierFree.Accessibility.Hearing 498 * @since 8 499 */ 500 backgroundColor: number | string; 501 /** 502 * Indicates the window color of captions. 503 * 504 * @syscap SystemCapability.BarrierFree.Accessibility.Hearing 505 * @since 8 506 */ 507 windowColor: number | string; 508 } 509 510 /** 511 * Indicates the info of accessibility. 512 * 513 * @typedef AccessibilityAbilityInfo 514 * @syscap SystemCapability.BarrierFree.Accessibility.Core 515 * @since 7 516 */ 517 interface AccessibilityAbilityInfo { 518 /** 519 * The ability id. 520 * 521 * @syscap SystemCapability.BarrierFree.Accessibility.Core 522 * @since 7 523 */ 524 readonly id: string; 525 526 /* The ability name. 527 * @since 7 528 */ 529 readonly name: string; 530 531 /* The bundle name of the ability. 532 * @since 7 533 */ 534 readonly bundleName: string; 535 536 /* The target bundle name for the observation. 537 * @since 9 538 */ 539 readonly targetBundleNames: Array<string>; 540 541 /** 542 * The type of the ability. 543 * 544 * @syscap SystemCapability.BarrierFree.Accessibility.Core 545 * @since 7 546 */ 547 readonly abilityTypes: Array<AbilityType>; 548 549 /** 550 * The capabilities of the ability. 551 * 552 * @syscap SystemCapability.BarrierFree.Accessibility.Core 553 * @since 7 554 */ 555 readonly capabilities: Array<Capability>; 556 557 /** 558 * The description of the ability. 559 * 560 * @syscap SystemCapability.BarrierFree.Accessibility.Core 561 * @since 7 562 */ 563 readonly description: string; 564 565 /** 566 * The events which the accessibility ability wants to observe. 567 * 568 * @syscap SystemCapability.BarrierFree.Accessibility.Core 569 * @since 7 570 */ 571 readonly eventTypes: Array<EventType>; 572 573 /** 574 * The whether the extended service needs to be hidden. 575 * 576 * @syscap SystemCapability.BarrierFree.Accessibility.Core 577 * @since 12 578 */ 579 readonly needHide: boolean; 580 } 581 582 /** 583 * Indicates the info of events. 584 * 585 * @syscap SystemCapability.BarrierFree.Accessibility.Core 586 * @since 7 587 */ 588 class EventInfo { 589 constructor(jsonObject); 590 /** 591 * The type of an accessibility event. 592 * 593 * @syscap SystemCapability.BarrierFree.Accessibility.Core 594 * @since 7 595 */ 596 type: EventType; 597 598 /** 599 * The type of the window change event. 600 * 601 * @syscap SystemCapability.BarrierFree.Accessibility.Core 602 * @since 7 603 */ 604 windowUpdateType?: WindowUpdateType; 605 606 /** 607 * The bundle name of the target application. 608 * 609 * @syscap SystemCapability.BarrierFree.Accessibility.Core 610 * @since 7 611 */ 612 bundleName: string; 613 614 /** 615 * The type of the event source component,such as button, chart. 616 * 617 * @syscap SystemCapability.BarrierFree.Accessibility.Core 618 * @since 7 619 */ 620 componentType?: string; 621 622 /** 623 * The page id of the event source. 624 * 625 * @syscap SystemCapability.BarrierFree.Accessibility.Core 626 * @since 7 627 */ 628 pageId?: number; 629 630 /** 631 * The accessibility event description. 632 * 633 * @syscap SystemCapability.BarrierFree.Accessibility.Core 634 * @since 7 635 */ 636 description?: string; 637 638 /** 639 * The action that triggers the accessibility event, for example, clicking or focusing a view. 640 * 641 * @syscap SystemCapability.BarrierFree.Accessibility.Core 642 * @since 7 643 */ 644 triggerAction: Action; 645 646 /** 647 * The movement step used for reading texts. 648 * 649 * @syscap SystemCapability.BarrierFree.Accessibility.Core 650 * @since 7 651 */ 652 textMoveUnit?: TextMoveUnit; 653 654 /** 655 * The content list. 656 * 657 * @syscap SystemCapability.BarrierFree.Accessibility.Core 658 * @since 7 659 */ 660 contents?: Array<string>; 661 662 /** 663 * The content changed before. 664 * 665 * @syscap SystemCapability.BarrierFree.Accessibility.Core 666 * @since 7 667 */ 668 lastContent?: string; 669 670 /** 671 * The start index of listed items on the screen. 672 * 673 * @syscap SystemCapability.BarrierFree.Accessibility.Core 674 * @since 7 675 */ 676 beginIndex?: number; 677 678 /** 679 * The index of the current item on the screen. 680 * 681 * @syscap SystemCapability.BarrierFree.Accessibility.Core 682 * @since 7 683 */ 684 currentIndex?: number; 685 686 /** 687 * The end index of listed items on the screen. 688 * 689 * @syscap SystemCapability.BarrierFree.Accessibility.Core 690 * @since 7 691 */ 692 endIndex?: number; 693 694 /** 695 * The total of the items, talkback used it when scroll. 696 * 697 * @syscap SystemCapability.BarrierFree.Accessibility.Core 698 * @since 7 699 */ 700 itemCount?: number; 701 702 /** 703 * The id of element. 704 * 705 * @syscap SystemCapability.BarrierFree.Accessibility.Core 706 * @since 12 707 */ 708 elementId?: number; 709 710 /** 711 * The context of announce accessibility text. 712 * 713 * @syscap SystemCapability.BarrierFree.Accessibility.Core 714 * @since 12 715 */ 716 textAnnouncedForAccessibility?: string; 717 } 718} 719export default accessibility; 720