Expose screen reader and navigation mode on demo/API
This commit is contained in:
@@ -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++) {
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user