Expose screen reader and navigation mode on demo/API

This commit is contained in:
Daniel Imms
2018-01-16 10:29:40 -08:00
parent 34eb08952c
commit 222c42f7ea
5 changed files with 41 additions and 2 deletions
+6
View File
@@ -47,6 +47,8 @@ export class AccessibilityManager implements IDisposable {
this._accessibilityTreeRoot.appendChild(this._rowContainer);
this._renderRowsDebouncer = new RenderDebouncer(this._terminal, this._renderRows.bind(this));
this._refreshRows();
this._navigationMode = new NavigationMode(this._terminal, this._rowContainer, this._rowElements, this);
this._liveRegion = document.createElement('div');
@@ -92,6 +94,10 @@ export class AccessibilityManager implements IDisposable {
return this._navigationMode.isActive;
}
public enterNavigationMode(): void {
this._navigationMode.enter();
}
private _onResize(cols: number, rows: number): void {
// Grow rows as required
for (let i = this._rowContainer.children.length; i < this._terminal.rows; i++) {
+6
View File
@@ -1334,6 +1334,12 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
}
}
public enterNavigationMode(): void {
if (this._accessibilityManager) {
this._accessibilityManager.enterNavigationMode();
}
}
/**
* Gets whether the terminal has an active selection.
*/