feat(core): first class a11y support (#8909)

This commit is contained in:
Morten Sjøgren
2021-01-29 20:51:51 +01:00
committed by Nathan Walker
parent 577b1e9dad
commit f2e21a50a7
43 changed files with 2938 additions and 47 deletions

36
packages/core/accessibility/index.d.ts vendored Normal file
View 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;