src/vs/workbench/contrib/terminal/browser/xterm/navigationModeAddon.ts/NavigationModeAddon/_focusLine
class NavigationModeAddon:	private _focusLine(type: 'previous' | 'next' | 'current'): void {
		if (!this._terminal?.element) {
			return;
		}
		// Focus row if a row is already focused
		if (document.activeElement && document.activeElement.parentElement && document.activeElement.parentElement.classList.contains('xterm-accessibility-tree')) {
			let element = <HTMLElement | null>document.activeElement;
			if (type !== 'current') {
				element = type === 'previous' ? <HTMLElement | null>document.activeElement.previousElementSibling : <HTMLElement | null>document.activeElement.nextElementSibling;
			}
			if (element) {
				element.focus();
				const disposable = addDisposableListener(element, 'blur', () => {
					this._navigationModeContextKey.set(false);
					disposable.dispose();
				});
				this._navigationModeContextKey.set(true);
			}
			return;
		}

		let targetRow: number;
		if (type === 'previous') {
			targetRow = Math.max(this._terminal.buffer.active.cursorY - 1, 0);
		} else {
			targetRow = this._terminal.buffer.active.cursorY;
		}
		this._focusRow(targetRow);
	}