无障碍接口废弃

Signed-off-by: lsl <lanshulei@huawei.com>
This commit is contained in:
lsl 2024-07-19 10:34:47 +08:00
parent d40527e5dd
commit 121256b0df
5 changed files with 38 additions and 0 deletions

View File

@ -33,6 +33,7 @@ export declare class GesturePath {
* @param { number } durationTime - Indicates the duration of the gesture. * @param { number } durationTime - Indicates the duration of the gesture.
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
constructor(durationTime: number); constructor(durationTime: number);
/** /**

View File

@ -32,6 +32,7 @@ export declare class GesturePoint {
* @param { number } positionY - Indicates the Y coordinate of point. * @param { number } positionY - Indicates the Y coordinate of point.
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
constructor(positionX: number, positionY: number); constructor(positionX: number, positionY: number);
/** /**

View File

@ -415,6 +415,7 @@ declare namespace accessibility {
* @returns { CaptionsManager } Returns the captions manager. * @returns { CaptionsManager } Returns the captions manager.
* @syscap SystemCapability.BarrierFree.Accessibility.Hearing * @syscap SystemCapability.BarrierFree.Accessibility.Hearing
* @since 8 * @since 8
* @deprecated since 12
*/ */
function getCaptionsManager(): CaptionsManager; function getCaptionsManager(): CaptionsManager;
@ -452,6 +453,7 @@ declare namespace accessibility {
* 3. Parameter verification failed. * 3. Parameter verification failed.
* @syscap SystemCapability.BarrierFree.Accessibility.Hearing * @syscap SystemCapability.BarrierFree.Accessibility.Hearing
* @since 8 * @since 8
* @deprecated since 12
*/ */
on(type: 'enableChange', callback: Callback<boolean>): void; on(type: 'enableChange', callback: Callback<boolean>): void;
@ -466,6 +468,7 @@ declare namespace accessibility {
* 3. Parameter verification failed. * 3. Parameter verification failed.
* @syscap SystemCapability.BarrierFree.Accessibility.Hearing * @syscap SystemCapability.BarrierFree.Accessibility.Hearing
* @since 8 * @since 8
* @deprecated since 12
*/ */
on(type: 'styleChange', callback: Callback<CaptionsStyle>): void; on(type: 'styleChange', callback: Callback<CaptionsStyle>): void;
@ -480,6 +483,7 @@ declare namespace accessibility {
* 3. Parameter verification failed. * 3. Parameter verification failed.
* @syscap SystemCapability.BarrierFree.Accessibility.Hearing * @syscap SystemCapability.BarrierFree.Accessibility.Hearing
* @since 8 * @since 8
* @deprecated since 12
*/ */
off(type: 'enableChange', callback?: Callback<boolean>): void; off(type: 'enableChange', callback?: Callback<boolean>): void;
@ -494,6 +498,7 @@ declare namespace accessibility {
* 3. Parameter verification failed. * 3. Parameter verification failed.
* @syscap SystemCapability.BarrierFree.Accessibility.Hearing * @syscap SystemCapability.BarrierFree.Accessibility.Hearing
* @since 8 * @since 8
* @deprecated since 12
*/ */
off(type: 'styleChange', callback?: Callback<CaptionsStyle>): void; off(type: 'styleChange', callback?: Callback<CaptionsStyle>): void;
} }

View File

@ -117,6 +117,7 @@ export default class AccessibilityExtensionAbility {
* *
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
onConnect(): void; onConnect(): void;
@ -125,6 +126,7 @@ export default class AccessibilityExtensionAbility {
* *
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
onDisconnect(): void; onDisconnect(): void;
@ -134,6 +136,7 @@ export default class AccessibilityExtensionAbility {
* @param { AccessibilityEvent } event Indicates an accessibility event. * @param { AccessibilityEvent } event Indicates an accessibility event.
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
onAccessibilityEvent(event: AccessibilityEvent): void; onAccessibilityEvent(event: AccessibilityEvent): void;
@ -144,6 +147,7 @@ export default class AccessibilityExtensionAbility {
* @returns { boolean } * @returns { boolean }
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
onKeyEvent(keyEvent: KeyEvent): boolean; onKeyEvent(keyEvent: KeyEvent): boolean;
} }

View File

@ -42,6 +42,7 @@ export default class AccessibilityExtensionContext extends ExtensionContext {
* 3. Parameter verification failed. * 3. Parameter verification failed.
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
setTargetBundleName(targetNames: Array<string>, callback: AsyncCallback<void>): void; setTargetBundleName(targetNames: Array<string>, callback: AsyncCallback<void>): void;
@ -56,6 +57,7 @@ export default class AccessibilityExtensionContext extends ExtensionContext {
* 3. Parameter verification failed. * 3. Parameter verification failed.
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
setTargetBundleName(targetNames: Array<string>): Promise<void>; setTargetBundleName(targetNames: Array<string>): Promise<void>;
@ -71,6 +73,7 @@ export default class AccessibilityExtensionContext extends ExtensionContext {
* @throws { BusinessError } 9300003 - No accessibility permission to perform the operation. * @throws { BusinessError } 9300003 - No accessibility permission to perform the operation.
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
getFocusElement(isAccessibilityFocus: boolean, callback: AsyncCallback<AccessibilityElement>): void; getFocusElement(isAccessibilityFocus: boolean, callback: AsyncCallback<AccessibilityElement>): void;
@ -86,6 +89,7 @@ export default class AccessibilityExtensionContext extends ExtensionContext {
* @throws { BusinessError } 9300003 - No accessibility permission to perform the operation. * @throws { BusinessError } 9300003 - No accessibility permission to perform the operation.
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
getFocusElement(isAccessibilityFocus?: boolean): Promise<AccessibilityElement>; getFocusElement(isAccessibilityFocus?: boolean): Promise<AccessibilityElement>;
@ -99,6 +103,7 @@ export default class AccessibilityExtensionContext extends ExtensionContext {
* @throws { BusinessError } 9300003 - No accessibility permission to perform the operation. * @throws { BusinessError } 9300003 - No accessibility permission to perform the operation.
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
getFocusElement(callback: AsyncCallback<AccessibilityElement>): void; getFocusElement(callback: AsyncCallback<AccessibilityElement>): void;
@ -114,6 +119,7 @@ export default class AccessibilityExtensionContext extends ExtensionContext {
* @throws { BusinessError } 9300003 - No accessibility permission to perform the operation. * @throws { BusinessError } 9300003 - No accessibility permission to perform the operation.
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
getWindowRootElement(windowId: number, callback: AsyncCallback<AccessibilityElement>): void; getWindowRootElement(windowId: number, callback: AsyncCallback<AccessibilityElement>): void;
@ -129,6 +135,7 @@ export default class AccessibilityExtensionContext extends ExtensionContext {
* @throws { BusinessError } 9300003 - No accessibility permission to perform the operation. * @throws { BusinessError } 9300003 - No accessibility permission to perform the operation.
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
getWindowRootElement(windowId?: number): Promise<AccessibilityElement>; getWindowRootElement(windowId?: number): Promise<AccessibilityElement>;
@ -142,6 +149,7 @@ export default class AccessibilityExtensionContext extends ExtensionContext {
* @throws { BusinessError } 9300003 - No accessibility permission to perform the operation. * @throws { BusinessError } 9300003 - No accessibility permission to perform the operation.
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
getWindowRootElement(callback: AsyncCallback<AccessibilityElement>): void; getWindowRootElement(callback: AsyncCallback<AccessibilityElement>): void;
@ -157,6 +165,7 @@ export default class AccessibilityExtensionContext extends ExtensionContext {
* @throws { BusinessError } 9300003 - No accessibility permission to perform the operation. * @throws { BusinessError } 9300003 - No accessibility permission to perform the operation.
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
getWindows(displayId: number, callback: AsyncCallback<Array<AccessibilityElement>>): void; getWindows(displayId: number, callback: AsyncCallback<Array<AccessibilityElement>>): void;
@ -172,6 +181,7 @@ export default class AccessibilityExtensionContext extends ExtensionContext {
* @throws { BusinessError } 9300003 - No accessibility permission to perform the operation. * @throws { BusinessError } 9300003 - No accessibility permission to perform the operation.
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
getWindows(displayId?: number): Promise<Array<AccessibilityElement>>; getWindows(displayId?: number): Promise<Array<AccessibilityElement>>;
@ -185,6 +195,7 @@ export default class AccessibilityExtensionContext extends ExtensionContext {
* @throws { BusinessError } 9300003 - No accessibility permission to perform the operation. * @throws { BusinessError } 9300003 - No accessibility permission to perform the operation.
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
getWindows(callback: AsyncCallback<Array<AccessibilityElement>>): void; getWindows(callback: AsyncCallback<Array<AccessibilityElement>>): void;
@ -233,6 +244,7 @@ export default class AccessibilityExtensionContext extends ExtensionContext {
* @throws { BusinessError } 9300003 - No accessibility permission to perform the operation. * @throws { BusinessError } 9300003 - No accessibility permission to perform the operation.
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 10 * @since 10
* @deprecated since 12
*/ */
injectGestureSync(gesturePath: GesturePath): void; injectGestureSync(gesturePath: GesturePath): void;
} }
@ -252,6 +264,7 @@ declare interface AccessibilityElement {
* @param { AsyncCallback<Array<T>> } callback Indicates the listener. * @param { AsyncCallback<Array<T>> } callback Indicates the listener.
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
attributeNames<T extends keyof ElementAttributeValues>(callback: AsyncCallback<Array<T>>): void; attributeNames<T extends keyof ElementAttributeValues>(callback: AsyncCallback<Array<T>>): void;
@ -260,6 +273,7 @@ declare interface AccessibilityElement {
* @returns { Promise<Array<T>> } * @returns { Promise<Array<T>> }
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
attributeNames<T extends keyof ElementAttributeValues>(): Promise<Array<T>>; attributeNames<T extends keyof ElementAttributeValues>(): Promise<Array<T>>;
@ -275,6 +289,7 @@ declare interface AccessibilityElement {
* @throws { BusinessError } 9300004 - This property does not exist. * @throws { BusinessError } 9300004 - This property does not exist.
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
attributeValue<T extends keyof ElementAttributeValues>( attributeValue<T extends keyof ElementAttributeValues>(
attributeName: T, attributeName: T,
@ -293,6 +308,7 @@ declare interface AccessibilityElement {
* @throws { BusinessError } 9300004 - This property does not exist. * @throws { BusinessError } 9300004 - This property does not exist.
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
attributeValue<T extends keyof ElementAttributeValues>(attributeName: T): Promise<ElementAttributeValues[T]>; attributeValue<T extends keyof ElementAttributeValues>(attributeName: T): Promise<ElementAttributeValues[T]>;
@ -302,6 +318,7 @@ declare interface AccessibilityElement {
* @param { AsyncCallback<Array<string>> } callback Indicates the listener. * @param { AsyncCallback<Array<string>> } callback Indicates the listener.
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
actionNames(callback: AsyncCallback<Array<string>>): void; actionNames(callback: AsyncCallback<Array<string>>): void;
@ -311,6 +328,7 @@ declare interface AccessibilityElement {
* @returns { Promise<Array<string>> } * @returns { Promise<Array<string>> }
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
actionNames(): Promise<Array<string>>; actionNames(): Promise<Array<string>>;
@ -327,6 +345,7 @@ declare interface AccessibilityElement {
* @throws { BusinessError } 9300005 - This action is not supported. * @throws { BusinessError } 9300005 - This action is not supported.
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
performAction(actionName: string, parameters: object, callback: AsyncCallback<void>): void; performAction(actionName: string, parameters: object, callback: AsyncCallback<void>): void;
@ -343,6 +362,7 @@ declare interface AccessibilityElement {
* @throws { BusinessError } 9300005 - This action is not supported. * @throws { BusinessError } 9300005 - This action is not supported.
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
performAction(actionName: string, parameters?: object): Promise<void>; performAction(actionName: string, parameters?: object): Promise<void>;
@ -358,6 +378,7 @@ declare interface AccessibilityElement {
* @throws { BusinessError } 9300005 - This action is not supported. * @throws { BusinessError } 9300005 - This action is not supported.
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
performAction(actionName: string, callback: AsyncCallback<void>): void; performAction(actionName: string, callback: AsyncCallback<void>): void;
@ -406,6 +427,7 @@ declare interface AccessibilityElement {
* 3. Parameter verification failed. * 3. Parameter verification failed.
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
findElement(type: 'content', condition: string, callback: AsyncCallback<Array<AccessibilityElement>>): void; findElement(type: 'content', condition: string, callback: AsyncCallback<Array<AccessibilityElement>>): void;
@ -421,6 +443,7 @@ declare interface AccessibilityElement {
* 3. Parameter verification failed. * 3. Parameter verification failed.
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
findElement(type: 'content', condition: string): Promise<Array<AccessibilityElement>>; findElement(type: 'content', condition: string): Promise<Array<AccessibilityElement>>;
@ -436,6 +459,7 @@ declare interface AccessibilityElement {
* 3. Parameter verification failed. * 3. Parameter verification failed.
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
findElement(type: 'focusType', condition: FocusType, callback: AsyncCallback<AccessibilityElement>): void; findElement(type: 'focusType', condition: FocusType, callback: AsyncCallback<AccessibilityElement>): void;
@ -451,6 +475,7 @@ declare interface AccessibilityElement {
* 3. Parameter verification failed. * 3. Parameter verification failed.
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
findElement(type: 'focusType', condition: FocusType): Promise<AccessibilityElement>; findElement(type: 'focusType', condition: FocusType): Promise<AccessibilityElement>;
@ -466,6 +491,7 @@ declare interface AccessibilityElement {
* 3. Parameter verification failed. * 3. Parameter verification failed.
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
findElement(type: 'focusDirection', condition: FocusDirection, callback: AsyncCallback<AccessibilityElement>): void; findElement(type: 'focusDirection', condition: FocusDirection, callback: AsyncCallback<AccessibilityElement>): void;
@ -481,6 +507,7 @@ declare interface AccessibilityElement {
* 3. Parameter verification failed. * 3. Parameter verification failed.
* @syscap SystemCapability.BarrierFree.Accessibility.Core * @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9 * @since 9
* @deprecated since 12
*/ */
findElement(type: 'focusDirection', condition: FocusDirection): Promise<AccessibilityElement>; findElement(type: 'focusDirection', condition: FocusDirection): Promise<AccessibilityElement>;