chore: a11y polish (#9259)

This commit is contained in:
Nathan Walker
2021-03-08 10:26:01 -08:00
parent aaeab990c8
commit a822f2affb
29 changed files with 356 additions and 261 deletions

View File

@@ -0,0 +1,23 @@
import { Page, ShownModallyData, Observable } from '@nativescript/core';
let page: Page;
let closeCallback: Function;
export function onShownModally(args: ShownModallyData) {
page = <Page>args.object;
page.bindingContext = new SampleModal();
closeCallback = args.closeCallback;
if (args.context) {
args.context.shownModally = true;
}
}
export class SampleModal extends Observable {
close() {
// TODO: a11y
// if (global.isIOS) {
// (<UIViewController>page.ios).view.accessibilityPerformEscape();
// }
closeCallback();
}
}