mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat(core): first class a11y support (#8909)
This commit is contained in:
committed by
Nathan Walker
parent
577b1e9dad
commit
f2e21a50a7
36
packages/core/accessibility/index.d.ts
vendored
Normal file
36
packages/core/accessibility/index.d.ts
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
import { View } from '../ui/core/view';
|
||||
import { AndroidAccessibilityEvent } from './accessibility-types';
|
||||
|
||||
export * from './accessibility-common';
|
||||
export * from './accessibility-types';
|
||||
export * from './font-scale';
|
||||
|
||||
/**
|
||||
* Initialize accessibility for View. This should be called on loaded-event.
|
||||
*/
|
||||
export function setupAccessibleView(view: View): void;
|
||||
|
||||
/**
|
||||
* Update accessibility properties on nativeView
|
||||
*/
|
||||
export function updateAccessibilityProperties(view: View): void;
|
||||
|
||||
/**
|
||||
* Android helper function for triggering accessibility events
|
||||
*/
|
||||
export function sendAccessibilityEvent(View: View, eventName: AndroidAccessibilityEvent, text?: string): void;
|
||||
|
||||
/**
|
||||
* Update the content description for android views
|
||||
*/
|
||||
export function updateContentDescription(View: View, forceUpdate?: boolean): string | null;
|
||||
|
||||
/**
|
||||
* Is Android TalkBack or iOS VoiceOver enabled?
|
||||
*/
|
||||
export function isAccessibilityServiceEnabled(): boolean;
|
||||
|
||||
/**
|
||||
* Find the last view focused on a page.
|
||||
*/
|
||||
export function getLastFocusedViewOnPage(page: Page): View | null;
|
||||
Reference in New Issue
Block a user