Skip to content

Commit

Permalink
fix #191591
Browse files Browse the repository at this point in the history
  • Loading branch information
meganrogge committed Aug 29, 2023
1 parent 5413247 commit a55a627
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,14 @@ export class TerminalAccessibleContentProvider extends Disposable implements IAc
const kb = this._keybindingService.lookupKeybindings(commandId);
// Run recent command has multiple keybindings. lookupKeybinding just returns the first one regardless of the when context.
// Thus, we have to check if accessibility mode is enabled to determine which keybinding to use.
return this._accessibilityService.isScreenReaderOptimized() ? format(msg, kb[1].getAriaLabel()) : format(msg, kb[0].getAriaLabel());
const isScreenReaderOptimized = this._accessibilityService.isScreenReaderOptimized();
if (isScreenReaderOptimized && kb[1]) {
format(msg, kb[1].getAriaLabel());
} else if (kb[0]) {
format(msg, kb[0].getAriaLabel());
} else {
return format(noKbMsg, commandId);
}
}
const kb = this._keybindingService.lookupKeybinding(commandId, this._contextKeyService)?.getAriaLabel();
return !kb ? format(noKbMsg, commandId) : format(msg, kb);
Expand Down

0 comments on commit a55a627

Please sign in to comment.