Remove navigation mode/more rows element
This commit is contained in:
@@ -23,11 +23,9 @@ export class AccessibilityManager implements IDisposable {
|
||||
private _rowContainer: HTMLElement;
|
||||
private _rowElements: HTMLElement[] = [];
|
||||
private _liveRegion: HTMLElement;
|
||||
private _moreRowsElement: HTMLElement;
|
||||
private _liveRegionLineCount: number = 0;
|
||||
|
||||
private _renderRowsDebouncer: RenderDebouncer;
|
||||
// private _navigationMode: NavigationMode;
|
||||
|
||||
private _topBoundaryFocusListener: (e: FocusEvent) => void;
|
||||
private _bottomBoundaryFocusListener: (e: FocusEvent) => void;
|
||||
@@ -49,12 +47,6 @@ export class AccessibilityManager implements IDisposable {
|
||||
this._accessibilityTreeRoot = document.createElement('div');
|
||||
this._accessibilityTreeRoot.classList.add('xterm-accessibility');
|
||||
|
||||
this._moreRowsElement = document.createElement('div');
|
||||
this._moreRowsElement.classList.add('xterm-message');
|
||||
this._moreRowsElement.style.clip = 'clip(0 0 0 0)';
|
||||
this._moreRowsElement.textContent = Strings.navigationModeMoreRows;
|
||||
this._accessibilityTreeRoot.appendChild(this._moreRowsElement);
|
||||
|
||||
this._rowContainer = document.createElement('div');
|
||||
this._rowContainer.classList.add('xterm-accessibility-tree');
|
||||
for (let i = 0; i < this._terminal.rows; i++) {
|
||||
@@ -178,25 +170,6 @@ export class AccessibilityManager implements IDisposable {
|
||||
e.stopImmediatePropagation();
|
||||
}
|
||||
|
||||
public get isNavigationModeActive(): boolean {
|
||||
// TODO: Remove this function
|
||||
return true;
|
||||
// return this._navigationMode.isActive;
|
||||
}
|
||||
|
||||
public enterNavigationMode(): void {
|
||||
// this._navigationMode.enter();
|
||||
|
||||
// this._isNavigationModeActive = true;
|
||||
this.announce('Entered line navigation mode');
|
||||
// this._rowContainer.tabIndex = 0;
|
||||
// this._rowContainer.setAttribute('role', 'list');
|
||||
// this._rowContainer.setAttribute('aria-activedescendant', this._activeItemId);
|
||||
// this._navigateToElement(this._terminal.buffer.ydisp + this._terminal.buffer.y);
|
||||
// this._rowContainer.focus();
|
||||
this._rowElements[this._rowElements.length - 1].focus();
|
||||
}
|
||||
|
||||
private _onResize(cols: number, rows: number): void {
|
||||
// Grow rows as required
|
||||
for (let i = this._rowContainer.children.length; i < this._terminal.rows; i++) {
|
||||
|
||||
@@ -4,5 +4,4 @@
|
||||
*/
|
||||
|
||||
export let promptLabel = 'Terminal input';
|
||||
export let navigationModeMoreRows = 'In order to properly navigation the terminal buffer you need to enter navigation mode';
|
||||
export let tooMuchOutput = 'Too much output to announce, navigate to rows manually to read';
|
||||
|
||||
@@ -1374,12 +1374,6 @@ 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.
|
||||
*/
|
||||
@@ -1420,10 +1414,6 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
|
||||
* @param {KeyboardEvent} ev The keydown event to be handled.
|
||||
*/
|
||||
protected _keyDown(ev: KeyboardEvent): boolean {
|
||||
if (this._accessibilityManager && this._accessibilityManager.isNavigationModeActive) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.customKeyEventHandler && this.customKeyEventHandler(ev) === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -10,9 +10,6 @@ import * as Browser from '../shared/utils/Browser';
|
||||
import { ITheme, IDisposable } from 'xterm';
|
||||
|
||||
export class MockTerminal implements ITerminal {
|
||||
enterNavigationMode(): void {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
getOption(key: any): any {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user