add default keybinding for toggling screen reader mode

This commit is contained in:
meganrogge
2023-07-19 09:22:25 -07:00
parent 87209068c4
commit 10ad83ca0f
2 changed files with 7 additions and 3 deletions
@@ -553,7 +553,7 @@ export class TextAreaHandler extends ViewPart {
private _getAriaLabel(options: IComputedEditorOptions): string {
const accessibilitySupport = options.get(EditorOption.accessibilitySupport);
if (accessibilitySupport === AccessibilitySupport.Disabled) {
return nls.localize('accessibilityOffAriaLabel', "The editor is not accessible at this time. Open the quick pick with {0} and run the command: Toggle Screen Reader Accessibility Mode for a screen reader optimized experience.", platform.isMacintosh ? 'Cmd+Shift+P' : 'Ctrl+Shift+P');
return nls.localize('accessibilityOffAriaLabel', "The editor is not accessible at this time. To enable screen reader optimized mode, use {0}", platform.isMacintosh ? 'Cmd+Shift+f1' : 'Ctrl+Shift+f1');
}
return options.get(EditorOption.ariaLabel);
}
@@ -22,11 +22,15 @@ class ToggleScreenReaderMode extends Action2 {
id: 'editor.action.toggleScreenReaderAccessibilityMode',
title: { value: nls.localize('toggleScreenReaderMode', "Toggle Screen Reader Accessibility Mode"), original: 'Toggle Screen Reader Accessibility Mode' },
f1: true,
keybinding: {
keybinding: [{
primary: KeyMod.CtrlCmd | KeyCode.KeyE,
weight: KeybindingWeight.WorkbenchContrib + 10,
when: accessibilityHelpIsShown
}
},
{
primary: KeyMod.CtrlCmd | KeyCode.F1 | KeyMod.Shift,
weight: KeybindingWeight.WorkbenchContrib + 10,
}]
});
}