Code change:
Currently when you use navigate accessible buffer you get a quick pick with the options, I expected changing these to scroll to the position without accepting it, and escape to revert to the original scroll position.
As part of this, providing ~1/3 of the viewport of context above would also be good
We'd need to think about how we to communicate the preview information to a screen reader user, as a pre"view" is usually visual
I don't think making this available to the screen reader makes sense, it would just complicate navigating the list. It is useful for sighted users though.
Oh I understand now - you mean on change of the active quick pick item, reveal the line and on enter, focus that line (as it already does)
Yep
To verify, in a terminal with shell integration, run some commands. to enter the accessible buffer. to . Without pressing , use the arrow keys to go between the options. It should scroll to the command if it is outside of the viewport.
Works but I opened

Related discussion:
text: this._bufferEditor.setScrollTop(this._bufferEditor.getScrollHeight()); } <del> async createQuickPick(): Promise<IQuickPick<IQuickPickItem> | undefined> { if (!this._focusedContextKey.get()) { await this.show(); } </del> <ins> async createQuickPick(): Promise<IQuickPick<IAccessibleBufferQuickPickItem> | undefined> { let currentPosition = withNullAsUndefined(this._bufferEditor.getPosition()); </ins> this._inQuickPick = true; const commands = this._instance.capabilities.get(TerminalCapability.CommandDetection)?.commands; if (!commands?.length) { return; } <del> const quickPickItems: IQuickPickItem[] = []; </del> <ins> const quickPickItems: IAccessibleBufferQuickPickItem[] = []; </ins> for (const command of commands) { <del> let line = command.marker?.line; </del> <ins> const line = command.marker?.line; </ins> if (!line || !command.command.length) { continue; } <del> line = this._bufferToEditorIndex.get(line); if (!line) { continue; } </del> quickPickItems.push( { label: localize('terminal.integrated.symbolQuickPick.labelNoExitCode', '{0}', command.command), <del> meta: JSON.stringify({ line: line + 1, exitCode: command.exitCode }) </del> <ins> lineNumber: line + 1, exitCode: command.exitCode </ins> }); } <del> const quickPick = this._quickInputService.createQuickPick<IQuickPickItem>(); </del> <ins> const quickPick = this._quickInputService.createQuickPick<IAccessibleBufferQuickPickItem>(); quickPick.canSelectMany = false; quickPick.onDidChangeActive(() => { const activeItem = quickPick.activeItems[0]; if (activeItem.exitCode) { this._audioCueService.playAudioCue(AudioCue.error, true); } this._bufferEditor.revealLine(activeItem.lineNumber, 0); }); quickPick.onDidHide(() => { if (currentPosition) { this._bufferEditor.setPosition(currentPosition); this._bufferEditor.revealLineInCenter(currentPosition.lineNumber); } quickPick.dispose(); this._inQuickPick = false; }); </ins> quickPick.onDidAccept(() => { const item = quickPick.activeItems[0]; const model = this._bufferEditor.getModel(); <del> if (!model || !item.meta) { </del> <ins> if (!model) { </ins> return; } <ins> if (!item && currentPosition) { // reset this._bufferEditor.setPosition(currentPosition); } else { this._bufferEditor.setSelection({ startLineNumber: item.lineNumber, startColumn: 1, endLineNumber: item.lineNumber, endColumn: 1 }); currentPosition = this._bufferEditor.getSelection()?.getPosition(); } </ins> quickPick.hide(); <del> const data: { line: number; exitCode: number } = JSON.parse(item.meta); this._bufferEditor.setSelection({ startLineNumber: data.line, startColumn: 1, endLineNumber: data.line, endColumn: 1 }); this._bufferEditor.revealLine(data.line); </del> this._inQuickPick = false; return; }); <del> quickPick.onDidChangeActive(() => { const data = quickPick.activeItems?.[0]?.meta; if (data && JSON.parse(data).exitCode) { this._audioCueService.playAudioCue(AudioCue.error, true); } }); </del> quickPick.items = quickPickItems.reverse(); return quickPick; } async show(): Promise<void> { await this._updateEditor(); <del> this._prependNewLine = true; </del> this._accessibleBuffer.tabIndex = -1; this._bufferEditor.layout({ width: this._xtermElement.clientWidth, height: this._xtermElement.clientHeight }); this._accessibleBuffer.classList.add(CssClass.Active);