• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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   * Checks screen reader ability is enabled.
167   *
168   * @returns { boolean } Returns true if the screen reader is enabled; returns false otherwise.
169   * @syscap SystemCapability.BarrierFree.Accessibility.Vision
170   * @since 16
171   */
172    function isScreenReaderOpenSync(): boolean;
173
174  /**
175   * Queries the list of accessibility abilities.
176   *
177   * @param { AbilityType } abilityType The type of the accessibility ability. {@code AbilityType} eg.spoken
178   * @param { AbilityState } stateType The state of the accessibility ability.  {@code AbilityState} eg.installed
179   * @param { AsyncCallback<Array<AccessibilityAbilityInfo>> } callback
180   * @syscap SystemCapability.BarrierFree.Accessibility.Core
181   * @since 7
182   * @deprecated since 9
183   */
184  function getAbilityLists(
185    abilityType: AbilityType,
186    stateType: AbilityState,
187    callback: AsyncCallback<Array<AccessibilityAbilityInfo>>
188  ): void;
189
190  /**
191   * Queries the list of accessibility abilities.
192   *
193   * @param { AbilityType } abilityType The type of the accessibility ability. {@code AbilityType} eg.spoken
194   * @param { AbilityState } stateType The state of the accessibility ability.  {@code AbilityState} eg.installed
195   * @returns { Promise<Array<AccessibilityAbilityInfo>> } Returns the list of abilityInfos.
196   * @syscap SystemCapability.BarrierFree.Accessibility.Core
197   * @since 7
198   * @deprecated since 9
199   */
200  function getAbilityLists(abilityType: AbilityType, stateType: AbilityState): Promise<Array<AccessibilityAbilityInfo>>;
201
202  /**
203   * Queries the list of accessibility abilities.
204   *
205   * @param { AbilityType } abilityType The type of the accessibility ability. {@code AbilityType} eg.spoken
206   * @param { AbilityState } stateType The state of the accessibility ability.  {@code AbilityState} eg.installed
207   * @returns { Promise<Array<AccessibilityAbilityInfo>> } Returns the list of abilityInfos.
208   * @throws { BusinessError } 401 - Parameter error. Possible causes:
209   *                           1. Mandatory parameters are left unspecified;
210   *                           2. Incorrect parameter types;
211   *                           3. Parameter verification failed.
212   * @syscap SystemCapability.BarrierFree.Accessibility.Core
213   * @since 9
214   */
215  function getAccessibilityExtensionList(
216    abilityType: AbilityType,
217    stateType: AbilityState
218  ): Promise<Array<AccessibilityAbilityInfo>>;
219
220  /**
221   * Queries the list of accessibility abilities.
222   *
223   * @param { AbilityType } abilityType The type of the accessibility ability. {@code AbilityType} eg.spoken
224   * @param { AbilityState } stateType The state of the accessibility ability.  {@code AbilityState} eg.installed
225   * @param { AsyncCallback<Array<AccessibilityAbilityInfo>> } callback
226   * @throws { BusinessError } 401 - Parameter error. Possible causes:
227   *                           1. Mandatory parameters are left unspecified;
228   *                           2. Incorrect parameter types;
229   *                           3. Parameter verification failed.
230   * @syscap SystemCapability.BarrierFree.Accessibility.Core
231   * @since 9
232   */
233  function getAccessibilityExtensionList(
234    abilityType: AbilityType,
235    stateType: AbilityState,
236    callback: AsyncCallback<Array<AccessibilityAbilityInfo>>
237  ): void;
238
239  /**
240   * Queries the list of accessibility abilities.
241   *
242   * @param { AbilityType } abilityType The type of the accessibility ability. {@code AbilityType} eg.spoken
243   * @param { AbilityState } stateType The state of the accessibility ability.  {@code AbilityState} eg.installed
244   * @returns { Array<AccessibilityAbilityInfo> } Returns the list of abilityInfos.
245   * @throws { BusinessError } 401 - Parameter error. Possible causes:
246   *                           1. Mandatory parameters are left unspecified;
247   *                           2. Incorrect parameter types;
248   *                           3. Parameter verification failed.
249   * @syscap SystemCapability.BarrierFree.Accessibility.Core
250   * @since 12
251   */
252  function getAccessibilityExtensionListSync(
253    abilityType: AbilityType,
254    stateType: AbilityState
255  ): Array<AccessibilityAbilityInfo>;
256
257  /**
258   * Send accessibility Event.
259   *
260   * @param { EventInfo } event The object of the accessibility {@code EventInfo} .
261   * @param { AsyncCallback<void> } callback Asynchronous callback interface.
262   * @syscap SystemCapability.BarrierFree.Accessibility.Core
263   * @since 7
264   * @deprecated since 9
265   */
266  function sendEvent(event: EventInfo, callback: AsyncCallback<void>): void;
267
268  /**
269   * Send accessibility Event.
270   *
271   * @param { EventInfo } event The object of the accessibility {@code EventInfo} .
272   * @returns { Promise<void> } Returns {@code true} if success ; returns {@code false} otherwise.
273   * @syscap SystemCapability.BarrierFree.Accessibility.Core
274   * @since 7
275   * @deprecated since 9
276   */
277  function sendEvent(event: EventInfo): Promise<void>;
278
279  /**
280   * Send accessibility event.
281   *
282   * @param { EventInfo } event The object of the accessibility {@code EventInfo} .
283   * @param { AsyncCallback<void> } callback Asynchronous callback interface.
284   * @throws { BusinessError } 401 - Parameter error. Possible causes:
285   *                           1. Mandatory parameters are left unspecified;
286   *                           2. Incorrect parameter types;
287   *                           3. Parameter verification failed.
288   * @syscap SystemCapability.BarrierFree.Accessibility.Core
289   * @since 9
290   */
291  function sendAccessibilityEvent(event: EventInfo, callback: AsyncCallback<void>): void;
292
293  /**
294   * Send accessibility event.
295   *
296   * @param { EventInfo } event The object of the accessibility {@code EventInfo} .
297   * @returns { Promise<void> } Returns {@code true} if success ; returns {@code false} otherwise.
298   * @throws { BusinessError } 401 - Parameter error. Possible causes:
299   *                           1. Mandatory parameters are left unspecified;
300   *                           2. Incorrect parameter types;
301   *                           3. Parameter verification failed.
302   * @syscap SystemCapability.BarrierFree.Accessibility.Core
303   * @since 9
304   */
305  function sendAccessibilityEvent(event: EventInfo): Promise<void>;
306
307  /**
308   * Register the observe of the accessibility state changed.
309   *
310   * @param { 'accessibilityStateChange' } type state event type.
311   * @param { Callback<boolean> } callback Asynchronous callback interface.
312   * @throws { BusinessError } 401 - Parameter error. Possible causes:
313   *                           1. Mandatory parameters are left unspecified;
314   *                           2. Incorrect parameter types;
315   *                           3. Parameter verification failed.
316   * @syscap SystemCapability.BarrierFree.Accessibility.Core
317   * @since 7
318   */
319  function on(type: 'accessibilityStateChange', callback: Callback<boolean>): void;
320
321  /**
322   * Register the observe of the touchGuide state changed.
323   *
324   * @param { 'touchGuideStateChange' } type state event type.
325   * @param { Callback<boolean> } callback Asynchronous callback interface.
326   * @throws { BusinessError } 401 - Parameter error. Possible causes:
327   *                           1. Mandatory parameters are left unspecified;
328   *                           2. Incorrect parameter types;
329   *                           3. Parameter verification failed.
330   * @syscap SystemCapability.BarrierFree.Accessibility.Vision
331   * @since 7
332   */
333  function on(type: 'touchGuideStateChange', callback: Callback<boolean>): void;
334
335  /**
336   * Register the observe of the screen reader state changed.
337   *
338   * @param { 'screenReaderStateChange' } type state event type.
339   * @param { Callback<boolean> } callback Asynchronous callback interface.
340   * @throws { BusinessError } 401 - Parameter error. Possible causes:
341   *                           1. Mandatory parameters are left unspecified;
342   *                           2. Incorrect parameter types;
343   *                           3. Parameter verification failed.
344   * @syscap SystemCapability.BarrierFree.Accessibility.Core
345   * @since 16
346   */
347  function on(type: 'screenReaderStateChange', callback: Callback<boolean>): void;
348
349  /**
350   * Deregister the observe of the accessibility state changed.
351   *
352   * @param { 'accessibilityStateChange' } type state event type
353   * @param { Callback<boolean> } callback Asynchronous callback interface.
354   * @throws { BusinessError } 401 - Parameter error. Possible causes:
355   *                           1. Mandatory parameters are left unspecified;
356   *                           2. Incorrect parameter types;
357   *                           3. Parameter verification failed.
358   * @syscap SystemCapability.BarrierFree.Accessibility.Core
359   * @since 7
360   */
361  function off(type: 'accessibilityStateChange', callback?: Callback<boolean>): void;
362
363  /**
364   * Deregister the observe of the touchGuide state changed.
365   *
366   * @param { 'touchGuideStateChange' } type state event type
367   * @param { Callback<boolean> } callback Asynchronous callback interface.
368   * @throws { BusinessError } 401 - Parameter error. Possible causes:
369   *                           1. Mandatory parameters are left unspecified;
370   *                           2. Incorrect parameter types;
371   *                           3. Parameter verification failed.
372   * @syscap SystemCapability.BarrierFree.Accessibility.Core
373   * @since 7
374   */
375  function off(type: 'touchGuideStateChange', callback?: Callback<boolean>): void;
376
377    /**
378   * Deregister the observe of the screen reader state changed.
379   *
380   * @param { 'screenReaderStateChange' } type state event type
381   * @param { Callback<boolean> } callback Asynchronous callback interface.
382   * @throws { BusinessError } 401 - Parameter error. Possible causes:
383   *                           1. Mandatory parameters are left unspecified;
384   *                           2. Incorrect parameter types;
385   *                           3. Parameter verification failed.
386   * @syscap SystemCapability.BarrierFree.Accessibility.Core
387   * @since 16
388   */
389    function off(type: 'screenReaderStateChange', callback?: Callback<boolean>): void;
390
391  /**
392   * Get the captions manager.
393   *
394   * @returns { CaptionsManager } Returns the captions manager.
395   * @syscap SystemCapability.BarrierFree.Accessibility.Hearing
396   * @since 8
397   */
398  function getCaptionsManager(): CaptionsManager;
399
400  /**
401   * Indicates the captions manager.
402   *
403   * @typedef CaptionsManager
404   * @syscap SystemCapability.BarrierFree.Accessibility.Hearing
405   * @since 8
406   */
407  interface CaptionsManager {
408    /**
409     * Indicates whether captions are enabled.
410     *
411     * @syscap SystemCapability.BarrierFree.Accessibility.Hearing
412     * @since 8
413     */
414    enabled: boolean;
415    /**
416     * Indicates the style of captions.
417     *
418     * @syscap SystemCapability.BarrierFree.Accessibility.Hearing
419     * @since 8
420     */
421    style: CaptionsStyle;
422
423    /**
424     * Register the observe of the enable state.
425     *
426     * @param { 'enableChange' } type
427     * @param { Callback<boolean> } callback
428     * @throws { BusinessError } 401 - Parameter error. Possible causes:
429     *                           1. Mandatory parameters are left unspecified;
430     *                           2. Incorrect parameter types;
431     *                           3. Parameter verification failed.
432     * @syscap SystemCapability.BarrierFree.Accessibility.Hearing
433     * @since 8
434     */
435    on(type: 'enableChange', callback: Callback<boolean>): void;
436
437    /**
438     * Register the observer of the style.
439     *
440     * @param { 'styleChange' } type
441     * @param { Callback<CaptionsStyle> } callback
442     * @throws { BusinessError } 401 - Parameter error. Possible causes:
443     *                           1. Mandatory parameters are left unspecified;
444     *                           2. Incorrect parameter types;
445     *                           3. Parameter verification failed.
446     * @syscap SystemCapability.BarrierFree.Accessibility.Hearing
447     * @since 8
448     */
449    on(type: 'styleChange', callback: Callback<CaptionsStyle>): void;
450
451    /**
452     * Deregister the observe of the enable state.
453     *
454     * @param { 'enableChange' } type
455     * @param { Callback<boolean> } callback
456     * @throws { BusinessError } 401 - Parameter error. Possible causes:
457     *                           1. Mandatory parameters are left unspecified;
458     *                           2. Incorrect parameter types;
459     *                           3. Parameter verification failed.
460     * @syscap SystemCapability.BarrierFree.Accessibility.Hearing
461     * @since 8
462     */
463    off(type: 'enableChange', callback?: Callback<boolean>): void;
464
465    /**
466     * Deregister the observer of the style.
467     *
468     * @param { 'styleChange' } type
469     * @param { Callback<CaptionsStyle> } callback
470     * @throws { BusinessError } 401 - Parameter error. Possible causes:
471     *                           1. Mandatory parameters are left unspecified;
472     *                           2. Incorrect parameter types;
473     *                           3. Parameter verification failed.
474     * @syscap SystemCapability.BarrierFree.Accessibility.Hearing
475     * @since 8
476     */
477    off(type: 'styleChange', callback?: Callback<CaptionsStyle>): void;
478  }
479
480  /**
481   * Indicates the edge type of the captions font.
482   *
483   * @syscap SystemCapability.BarrierFree.Accessibility.Hearing
484   * @since 8
485   */
486  type CaptionsFontEdgeType = 'none' | 'raised' | 'depressed' | 'uniform' | 'dropShadow';
487  /**
488   * Indicates the font family of captions.
489   *
490   * @syscap SystemCapability.BarrierFree.Accessibility.Hearing
491   * @since 8
492   */
493  type CaptionsFontFamily = 'default' | 'monospacedSerif' | 'serif' |
494    'monospacedSansSerif' | 'sansSerif' | 'casual' | 'cursive' | 'smallCapitals';
495  /**
496   * Indicates the style of captions.
497   *
498   * @typedef CaptionsStyle
499   * @syscap SystemCapability.BarrierFree.Accessibility.Hearing
500   * @since 8
501   */
502  interface CaptionsStyle {
503    /**
504     * Indicates the font family of captions.
505     *
506     * @syscap SystemCapability.BarrierFree.Accessibility.Hearing
507     * @since 8
508     */
509    fontFamily: CaptionsFontFamily;
510    /**
511     * Indicates the font scaling of captions.
512     *
513     * @syscap SystemCapability.BarrierFree.Accessibility.Hearing
514     * @since 8
515     */
516    fontScale: number;
517    /**
518     * Indicates the font color of captions.
519     *
520     * @syscap SystemCapability.BarrierFree.Accessibility.Hearing
521     * @since 8
522     */
523    fontColor: number | string;
524    /**
525     * Indicates the edge type of the captions font.
526     *
527     * @syscap SystemCapability.BarrierFree.Accessibility.Hearing
528     * @since 8
529     */
530    fontEdgeType: CaptionsFontEdgeType;
531    /**
532     * Indicates the background color of captions.
533     *
534     * @syscap SystemCapability.BarrierFree.Accessibility.Hearing
535     * @since 8
536     */
537    backgroundColor: number | string;
538    /**
539     * Indicates the window color of captions.
540     *
541     * @syscap SystemCapability.BarrierFree.Accessibility.Hearing
542     * @since 8
543     */
544    windowColor: number | string;
545  }
546
547  /**
548   * Indicates the info of accessibility.
549   *
550   * @typedef AccessibilityAbilityInfo
551   * @syscap SystemCapability.BarrierFree.Accessibility.Core
552   * @since 7
553   */
554  interface AccessibilityAbilityInfo {
555    /**
556     * The ability id.
557     *
558     * @syscap SystemCapability.BarrierFree.Accessibility.Core
559     * @since 7
560     */
561    readonly id: string;
562
563    /* The ability name.
564     * @since 7
565     */
566    readonly name: string;
567
568    /* The bundle name of the ability.
569     * @since 7
570     */
571    readonly bundleName: string;
572
573    /* The target bundle name for the observation.
574     * @since 9
575     */
576    readonly targetBundleNames: Array<string>;
577
578    /**
579     * The type of the ability.
580     *
581     * @syscap SystemCapability.BarrierFree.Accessibility.Core
582     * @since 7
583     */
584    readonly abilityTypes: Array<AbilityType>;
585
586    /**
587     * The capabilities of the ability.
588     *
589     * @syscap SystemCapability.BarrierFree.Accessibility.Core
590     * @since 7
591     */
592    readonly capabilities: Array<Capability>;
593
594    /**
595     * The description of the ability.
596     *
597     * @syscap SystemCapability.BarrierFree.Accessibility.Core
598     * @since 7
599     */
600    readonly description: string;
601
602    /**
603     * The events which the accessibility ability wants to observe.
604     *
605     * @syscap SystemCapability.BarrierFree.Accessibility.Core
606     * @since 7
607     */
608    readonly eventTypes: Array<EventType>;
609
610    /**
611     * The whether the extended service needs to be hidden.
612     *
613     * @syscap SystemCapability.BarrierFree.Accessibility.Core
614     * @since 12
615     */
616    readonly needHide: boolean;
617  }
618
619  /**
620   * Indicates the info of events.
621   *
622   * @syscap SystemCapability.BarrierFree.Accessibility.Core
623   * @since 7
624   */
625  class EventInfo {
626    constructor(jsonObject);
627    /**
628     * The type of an accessibility event.
629     *
630     * @syscap SystemCapability.BarrierFree.Accessibility.Core
631     * @since 7
632     */
633    type: EventType;
634
635    /**
636     * The type of the window change event.
637     *
638     * @syscap SystemCapability.BarrierFree.Accessibility.Core
639     * @since 7
640     */
641    windowUpdateType?: WindowUpdateType;
642
643    /**
644     * The bundle name of the target application.
645     *
646     * @syscap SystemCapability.BarrierFree.Accessibility.Core
647     * @since 7
648     */
649    bundleName: string;
650
651    /**
652     * The type of the event source component,such as button, chart.
653     *
654     * @syscap SystemCapability.BarrierFree.Accessibility.Core
655     * @since 7
656     */
657    componentType?: string;
658
659    /**
660     * The page id of the event source.
661     *
662     * @syscap SystemCapability.BarrierFree.Accessibility.Core
663     * @since 7
664     */
665    pageId?: number;
666
667    /**
668     * The accessibility event description.
669     *
670     * @syscap SystemCapability.BarrierFree.Accessibility.Core
671     * @since 7
672     */
673    description?: string;
674
675    /**
676     * The action that triggers the accessibility event, for example, clicking or focusing a view.
677     *
678     * @syscap SystemCapability.BarrierFree.Accessibility.Core
679     * @since 7
680     */
681    triggerAction: Action;
682
683    /**
684     * The movement step used for reading texts.
685     *
686     * @syscap SystemCapability.BarrierFree.Accessibility.Core
687     * @since 7
688     */
689    textMoveUnit?: TextMoveUnit;
690
691    /**
692     * The content list.
693     *
694     * @syscap SystemCapability.BarrierFree.Accessibility.Core
695     * @since 7
696     */
697    contents?: Array<string>;
698
699    /**
700     * The content changed before.
701     *
702     * @syscap SystemCapability.BarrierFree.Accessibility.Core
703     * @since 7
704     */
705    lastContent?: string;
706
707    /**
708     * The start index of listed items on the screen.
709     *
710     * @syscap SystemCapability.BarrierFree.Accessibility.Core
711     * @since 7
712     */
713    beginIndex?: number;
714
715    /**
716     * The index of the current item on the screen.
717     *
718     * @syscap SystemCapability.BarrierFree.Accessibility.Core
719     * @since 7
720     */
721    currentIndex?: number;
722
723    /**
724     * The end index of listed items on the screen.
725     *
726     * @syscap SystemCapability.BarrierFree.Accessibility.Core
727     * @since 7
728     */
729    endIndex?: number;
730
731    /**
732     * The total of the items, talkback used it when scroll.
733     *
734     * @syscap SystemCapability.BarrierFree.Accessibility.Core
735     * @since 7
736     */
737    itemCount?: number;
738
739    /**
740     * The id of element.
741     *
742     * @syscap SystemCapability.BarrierFree.Accessibility.Core
743     * @since 12
744     */
745    elementId?: number;
746
747    /**
748     * The context of announce accessibility text.
749     *
750     * @syscap SystemCapability.BarrierFree.Accessibility.Core
751     * @since 12
752     */
753    textAnnouncedForAccessibility?: string;
754  }
755}
756export default accessibility;
757