@codingame/monaco-vscode-accessibility-service-override 36.2.7 → 37.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityStatus.js +6 -6
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.js +52 -33
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/commands.js +9 -9
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/openDiffEditorAnnouncement.js +1 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/accessibility/accessibility.js +5 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-accessibility-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "37.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - accessibility service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "
|
|
18
|
+
"@codingame/monaco-vscode-api": "37.0.0",
|
|
19
19
|
"marked": "14.0.0"
|
|
20
20
|
},
|
|
21
21
|
"main": "index.js",
|
|
@@ -53,21 +53,21 @@ let AccessibilityStatus = class AccessibilityStatus extends Disposable {
|
|
|
53
53
|
}
|
|
54
54
|
showScreenReaderNotification() {
|
|
55
55
|
this.screenReaderNotification = this.notificationService.prompt(Severity.Info, ( localize(
|
|
56
|
-
|
|
56
|
+
5010,
|
|
57
57
|
"Screen reader usage detected. Do you want to enable {0} to optimize the editor for screen reader usage?",
|
|
58
58
|
"editor.accessibilitySupport"
|
|
59
59
|
)), [{
|
|
60
|
-
label: ( localize(
|
|
60
|
+
label: ( localize(5011, "Yes")),
|
|
61
61
|
run: () => {
|
|
62
62
|
this.configurationService.updateValue("editor.accessibilitySupport", "on", ConfigurationTarget.USER);
|
|
63
63
|
}
|
|
64
64
|
}, {
|
|
65
|
-
label: ( localize(
|
|
65
|
+
label: ( localize(5012, "No")),
|
|
66
66
|
run: () => {
|
|
67
67
|
this.configurationService.updateValue("editor.accessibilitySupport", "off", ConfigurationTarget.USER);
|
|
68
68
|
}
|
|
69
69
|
}, {
|
|
70
|
-
label: ( localize(
|
|
70
|
+
label: ( localize(5013, "Learn More")),
|
|
71
71
|
run: () => {
|
|
72
72
|
this.openerService.open("https://code.visualstudio.com/docs/editor/accessibility#_screen-readers");
|
|
73
73
|
}
|
|
@@ -80,9 +80,9 @@ let AccessibilityStatus = class AccessibilityStatus extends Disposable {
|
|
|
80
80
|
updateScreenReaderModeElement(visible) {
|
|
81
81
|
if (visible) {
|
|
82
82
|
if (!this.screenReaderModeElement.value) {
|
|
83
|
-
const text = ( localize(
|
|
83
|
+
const text = ( localize(5014, "Screen Reader Optimized"));
|
|
84
84
|
this.screenReaderModeElement.value = this.statusbarService.addEntry({
|
|
85
|
-
name: ( localize(
|
|
85
|
+
name: ( localize(5015, "Screen Reader Mode")),
|
|
86
86
|
text,
|
|
87
87
|
ariaLabel: text,
|
|
88
88
|
command: "showEditorScreenReaderNotification",
|
|
@@ -55,6 +55,7 @@ export declare class AccessibleView extends Disposable {
|
|
|
55
55
|
private _container;
|
|
56
56
|
private _title;
|
|
57
57
|
private readonly _toolbar;
|
|
58
|
+
private readonly _toolbarMenu;
|
|
58
59
|
private _currentProvider;
|
|
59
60
|
private _currentContent;
|
|
60
61
|
private _lastProvider;
|
|
@@ -68,6 +69,11 @@ export declare class AccessibleView extends Disposable {
|
|
|
68
69
|
getCodeBlockContext(): ICodeBlockActionContext | undefined;
|
|
69
70
|
navigateToCodeBlock(type: "next" | "previous"): void;
|
|
70
71
|
showLastProvider(id: AccessibleViewProviderId): void;
|
|
72
|
+
getAccessibilityStatus(): {
|
|
73
|
+
providerId: string | undefined;
|
|
74
|
+
isInCodeBlock: boolean;
|
|
75
|
+
onLastLine: boolean;
|
|
76
|
+
};
|
|
71
77
|
show(provider?: AccesibleViewContentProvider, symbol?: IAccessibleViewSymbol, showAccessibleViewHelp?: boolean, position?: IPosition): void;
|
|
72
78
|
previous(): void;
|
|
73
79
|
next(): void;
|
|
@@ -6,7 +6,7 @@ import { ActionsOrientation } from '@codingame/monaco-vscode-api/vscode/vs/base/
|
|
|
6
6
|
import { alert } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/aria/aria';
|
|
7
7
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
8
8
|
import { KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
|
|
9
|
-
import { Disposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
9
|
+
import { Disposable, MutableDisposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
10
10
|
import { marked } from 'marked';
|
|
11
11
|
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
12
12
|
import { isWindows, isMacintosh } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
@@ -92,6 +92,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
92
92
|
this._quickInputService = _quickInputService;
|
|
93
93
|
this._accessibilitySignalService = _accessibilitySignalService;
|
|
94
94
|
this._isInQuickPick = false;
|
|
95
|
+
this._toolbarMenu = this._register(( new MutableDisposable()));
|
|
95
96
|
this._lastProviderPosition = ( new Map());
|
|
96
97
|
this._accessiblityHelpIsShown = accessibilityHelpIsShown.bindTo(this._contextKeyService);
|
|
97
98
|
this._accessibleViewIsShown = accessibleViewIsShown.bindTo(this._contextKeyService);
|
|
@@ -281,6 +282,13 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
281
282
|
}
|
|
282
283
|
this.show(this._lastProvider);
|
|
283
284
|
}
|
|
285
|
+
getAccessibilityStatus() {
|
|
286
|
+
return {
|
|
287
|
+
providerId: this._currentProvider?.id,
|
|
288
|
+
isInCodeBlock: this._accessibleViewInCodeBlock.get() ?? false,
|
|
289
|
+
onLastLine: this._onLastLine.get() ?? false
|
|
290
|
+
};
|
|
291
|
+
}
|
|
284
292
|
show(provider, symbol, showAccessibleViewHelp, position) {
|
|
285
293
|
provider = provider ?? this._currentProvider;
|
|
286
294
|
if (!provider) {
|
|
@@ -303,6 +311,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
303
311
|
return this._render(provider, container, showAccessibleViewHelp);
|
|
304
312
|
},
|
|
305
313
|
onHide: () => {
|
|
314
|
+
this._toolbarMenu.clear();
|
|
306
315
|
if (!showAccessibleViewHelp) {
|
|
307
316
|
this._updateLastProvider();
|
|
308
317
|
if (this._currentProvider) {
|
|
@@ -465,8 +474,8 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
465
474
|
const disposables = this._register(( new DisposableStore()));
|
|
466
475
|
const quickPick = disposables.add(this._quickInputService.createQuickPick());
|
|
467
476
|
quickPick.items = items;
|
|
468
|
-
quickPick.title = ( localize(
|
|
469
|
-
quickPick.placeholder = ( localize(
|
|
477
|
+
quickPick.title = ( localize(5016, "Configure keybindings"));
|
|
478
|
+
quickPick.placeholder = ( localize(5017, "Select a command ID to configure a keybinding for it"));
|
|
470
479
|
quickPick.show();
|
|
471
480
|
disposables.add(quickPick.onDidAccept(async () => {
|
|
472
481
|
const item = quickPick.selectedItems[0];
|
|
@@ -509,8 +518,8 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
509
518
|
if (label) {
|
|
510
519
|
symbols.push({
|
|
511
520
|
markdownToParse: label,
|
|
512
|
-
label: ( localize(
|
|
513
|
-
ariaLabel: ( localize(
|
|
521
|
+
label: ( localize(5018, "({0}) {1}", token.type, label)),
|
|
522
|
+
ariaLabel: ( localize(5019, "({0}) {1}", token.type, label)),
|
|
514
523
|
firstListItem
|
|
515
524
|
});
|
|
516
525
|
firstListItem = undefined;
|
|
@@ -550,7 +559,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
550
559
|
}
|
|
551
560
|
this._configurationService.updateValue(this._currentProvider?.verbositySettingKey, false);
|
|
552
561
|
alert(( localize(
|
|
553
|
-
|
|
562
|
+
5020,
|
|
554
563
|
"{0} accessibility verbosity is now disabled",
|
|
555
564
|
this._currentProvider.verbositySettingKey
|
|
556
565
|
)));
|
|
@@ -615,6 +624,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
615
624
|
_render(provider, container, showAccessibleViewHelp, updatedContent) {
|
|
616
625
|
const isSameProvider = this._currentProvider?.id === provider.id;
|
|
617
626
|
const previousPosition = isSameProvider ? this._editorWidget.getPosition() : undefined;
|
|
627
|
+
const previousScrollTop = isSameProvider ? this._editorWidget.getScrollTop() : undefined;
|
|
618
628
|
this._currentProvider = provider;
|
|
619
629
|
this._accessibleViewCurrentProviderId.set(provider.id);
|
|
620
630
|
const verbose = this._verbosityEnabled();
|
|
@@ -644,16 +654,16 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
644
654
|
const hasActions = this._accessibleViewSupportsNavigation.get() || this._accessibleViewVerbosityEnabled.get() || this._accessibleViewGoToSymbolSupported.get() || provider.actions?.length;
|
|
645
655
|
if (verbose && !showAccessibleViewHelp && hasActions) {
|
|
646
656
|
actionsHint = provider.options.position ? ( localize(
|
|
647
|
-
|
|
657
|
+
5021,
|
|
648
658
|
"Explore actions such as disabling this hint (Shift+Tab), use Escape to exit this dialog."
|
|
649
|
-
)) : ( localize(
|
|
659
|
+
)) : ( localize(5022, "Explore actions such as disabling this hint (Shift+Tab)."));
|
|
650
660
|
}
|
|
651
|
-
let ariaLabel = provider.options.type === AccessibleViewType.Help ? ( localize(
|
|
661
|
+
let ariaLabel = provider.options.type === AccessibleViewType.Help ? ( localize(5023, "Accessibility Help")) : ( localize(5024, "Accessible View"));
|
|
652
662
|
this._title.textContent = ariaLabel;
|
|
653
663
|
if (actionsHint && provider.options.type === AccessibleViewType.View) {
|
|
654
|
-
ariaLabel = ( localize(
|
|
664
|
+
ariaLabel = ( localize(5025, "Accessible View, {0}", actionsHint));
|
|
655
665
|
} else if (actionsHint) {
|
|
656
|
-
ariaLabel = ( localize(
|
|
666
|
+
ariaLabel = ( localize(5026, "Accessibility Help, {0}", actionsHint));
|
|
657
667
|
}
|
|
658
668
|
if (isWindows && widgetIsFocused) {
|
|
659
669
|
ariaLabel = "";
|
|
@@ -665,8 +675,18 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
665
675
|
if (this._currentProvider?.options.position) {
|
|
666
676
|
const position = this._editorWidget.getPosition();
|
|
667
677
|
const isDefaultPosition = position?.lineNumber === 1 && position.column === 1;
|
|
668
|
-
|
|
669
|
-
|
|
678
|
+
const lineCount = this.editorWidget.getModel()?.getLineCount();
|
|
679
|
+
const savedPosition = this._lastProviderPosition.get(provider.id);
|
|
680
|
+
const preservedPosition = this._currentProvider.options.position === "initial-bottom-preserve" ? previousPosition ?? savedPosition : this._currentProvider.options.position === "initial-bottom" && !isSameProvider ? savedPosition : undefined;
|
|
681
|
+
if (preservedPosition && preservedPosition.lineNumber <= (lineCount ?? 0)) {
|
|
682
|
+
this._editorWidget.setPosition(preservedPosition);
|
|
683
|
+
if (this._currentProvider.options.position === "initial-bottom-preserve" && previousScrollTop !== undefined) {
|
|
684
|
+
this._editorWidget.setScrollTop(previousScrollTop);
|
|
685
|
+
} else {
|
|
686
|
+
this._editorWidget.revealLine(preservedPosition.lineNumber);
|
|
687
|
+
}
|
|
688
|
+
} else if (this._currentProvider.options.position === "bottom" || this._currentProvider.options.position === "initial-bottom-preserve" || this._currentProvider.options.position === "initial-bottom" && isDefaultPosition) {
|
|
689
|
+
const lastLine = lineCount;
|
|
670
690
|
const position = lastLine !== undefined && lastLine > 0 ? ( new Position(lastLine, 1)) : undefined;
|
|
671
691
|
if (position) {
|
|
672
692
|
this._editorWidget.setPosition(position);
|
|
@@ -747,10 +767,9 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
747
767
|
return disposableStore;
|
|
748
768
|
}
|
|
749
769
|
_updateToolbar(providedActions, type) {
|
|
750
|
-
this._toolbar.setAriaLabel(type === AccessibleViewType.Help ? ( localize(
|
|
751
|
-
const toolbarMenu = this.
|
|
752
|
-
|
|
753
|
-
);
|
|
770
|
+
this._toolbar.setAriaLabel(type === AccessibleViewType.Help ? ( localize(5027, "Accessibility Help")) : ( localize(5028, "Accessible View")));
|
|
771
|
+
const toolbarMenu = this._menuService.createMenu(MenuId.AccessibleView, this._contextKeyService);
|
|
772
|
+
this._toolbarMenu.value = toolbarMenu;
|
|
754
773
|
const menuActions = getFlatActionBarActions(toolbarMenu.getActions({}));
|
|
755
774
|
if (providedActions) {
|
|
756
775
|
for (const providedAction of providedActions) {
|
|
@@ -845,9 +864,9 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
845
864
|
_accessibleViewHelpDialogContent(providerHasSymbols) {
|
|
846
865
|
const navigationHint = this._navigationHint();
|
|
847
866
|
const goToSymbolHint = this._goToSymbolHint(providerHasSymbols);
|
|
848
|
-
const toolbarHint = ( localize(
|
|
867
|
+
const toolbarHint = ( localize(5029, "Navigate to the toolbar (Shift+Tab)."));
|
|
849
868
|
const chatHints = this._getChatHints();
|
|
850
|
-
let hint = ( localize(
|
|
869
|
+
let hint = ( localize(5030, "In the accessible view, you can:\n"));
|
|
851
870
|
if (navigationHint) {
|
|
852
871
|
hint += " - " + navigationHint + "\n";
|
|
853
872
|
}
|
|
@@ -867,22 +886,22 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
867
886
|
return;
|
|
868
887
|
}
|
|
869
888
|
return [( localize(
|
|
870
|
-
|
|
889
|
+
5031,
|
|
871
890
|
" - Insert the code block at the cursor{0}.",
|
|
872
891
|
"<keybinding:workbench.action.chat.insertCodeBlock>"
|
|
873
892
|
)), ( localize(
|
|
874
|
-
|
|
893
|
+
5032,
|
|
875
894
|
" - Insert the code block into a new file{0}.",
|
|
876
895
|
"<keybinding:workbench.action.chat.insertIntoNewFile>"
|
|
877
896
|
)), ( localize(
|
|
878
|
-
|
|
897
|
+
5033,
|
|
879
898
|
" - Run the code block in the terminal{0}.\n",
|
|
880
899
|
"<keybinding:workbench.action.chat.runInTerminal>"
|
|
881
900
|
))].join("\n");
|
|
882
901
|
}
|
|
883
902
|
_navigationHint() {
|
|
884
903
|
return localize(
|
|
885
|
-
|
|
904
|
+
5034,
|
|
886
905
|
"Show the next item{0} or previous item{1}.",
|
|
887
906
|
`<keybinding:${AccessibilityCommandId.ShowNext}>`,
|
|
888
907
|
`<keybinding:${AccessibilityCommandId.ShowPrevious}>`
|
|
@@ -891,7 +910,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
891
910
|
_disableVerbosityHint(provider) {
|
|
892
911
|
if (provider.options.type === AccessibleViewType.Help && this._verbosityEnabled()) {
|
|
893
912
|
return localize(
|
|
894
|
-
|
|
913
|
+
5035,
|
|
895
914
|
"\nDisable accessibility verbosity for this feature{0}.",
|
|
896
915
|
`<keybinding:${AccessibilityCommandId.DisableVerbosityHint}>`
|
|
897
916
|
);
|
|
@@ -903,7 +922,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
903
922
|
return;
|
|
904
923
|
}
|
|
905
924
|
return localize(
|
|
906
|
-
|
|
925
|
+
5036,
|
|
907
926
|
"Go to a symbol{0}.",
|
|
908
927
|
`<keybinding:${AccessibilityCommandId.GoToSymbol}>`
|
|
909
928
|
);
|
|
@@ -912,7 +931,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
912
931
|
const configureKb = this._keybindingService.lookupKeybinding(AccessibilityCommandId.AccessibilityHelpConfigureKeybindings)?.getAriaLabel();
|
|
913
932
|
const keybindingToConfigureQuickPick = configureKb ? "(" + configureKb + ")" : "by assigning a keybinding to the command Accessibility Help Configure Unassigned Keybindings.";
|
|
914
933
|
return localize(
|
|
915
|
-
|
|
934
|
+
5037,
|
|
916
935
|
"\nConfigure keybindings for commands that lack them {0}.",
|
|
917
936
|
keybindingToConfigureQuickPick
|
|
918
937
|
);
|
|
@@ -921,7 +940,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
921
940
|
const configureKb = this._keybindingService.lookupKeybinding(AccessibilityCommandId.AccessibilityHelpConfigureAssignedKeybindings)?.getAriaLabel();
|
|
922
941
|
const keybindingToConfigureQuickPick = configureKb ? "(" + configureKb + ")" : "by assigning a keybinding to the command Accessibility Help Configure Assigned Keybindings.";
|
|
923
942
|
return localize(
|
|
924
|
-
|
|
943
|
+
5038,
|
|
925
944
|
"\nConfigure keybindings for commands that already have assignments {0}.",
|
|
926
945
|
keybindingToConfigureQuickPick
|
|
927
946
|
);
|
|
@@ -940,11 +959,11 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
940
959
|
return screenReaderModeHint;
|
|
941
960
|
}
|
|
942
961
|
_exitDialogHint(provider) {
|
|
943
|
-
return this._verbosityEnabled() && !provider.options.position ? ( localize(
|
|
962
|
+
return this._verbosityEnabled() && !provider.options.position ? ( localize(5039, "\nExit this dialog (Escape).")) : "";
|
|
944
963
|
}
|
|
945
964
|
_readMoreHint(provider) {
|
|
946
965
|
return provider.options.readMoreUrl ? ( localize(
|
|
947
|
-
|
|
966
|
+
5040,
|
|
948
967
|
"\nOpen a browser window with more information related to accessibility{0}.",
|
|
949
968
|
`<keybinding:${AccessibilityCommandId.AccessibilityHelpOpenHelpLink}>`
|
|
950
969
|
)) : "";
|
|
@@ -989,10 +1008,10 @@ let AccessibleViewService = class AccessibleViewService extends Disposable {
|
|
|
989
1008
|
const keybinding = this._keybindingService.lookupKeybinding(AccessibilityCommandId.OpenAccessibleView)?.getAriaLabel();
|
|
990
1009
|
let hint = null;
|
|
991
1010
|
if (keybinding) {
|
|
992
|
-
hint = ( localize(
|
|
1011
|
+
hint = ( localize(5041, "Inspect this in the accessible view with {0}", keybinding));
|
|
993
1012
|
} else {
|
|
994
1013
|
hint = ( localize(
|
|
995
|
-
|
|
1014
|
+
5042,
|
|
996
1015
|
"Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."
|
|
997
1016
|
));
|
|
998
1017
|
}
|
|
@@ -1030,8 +1049,8 @@ let AccessibleViewSymbolQuickPick = class AccessibleViewSymbolQuickPick {
|
|
|
1030
1049
|
show(provider) {
|
|
1031
1050
|
const disposables = ( new DisposableStore());
|
|
1032
1051
|
const quickPick = disposables.add(this._quickInputService.createQuickPick());
|
|
1033
|
-
quickPick.placeholder = ( localize(
|
|
1034
|
-
quickPick.title = ( localize(
|
|
1052
|
+
quickPick.placeholder = ( localize(5043, "Type to search symbols"));
|
|
1053
|
+
quickPick.title = ( localize(5044, "Go to Symbol Accessible View"));
|
|
1035
1054
|
const picks = [];
|
|
1036
1055
|
const symbols = this._accessibleView.getSymbols();
|
|
1037
1056
|
if (!symbols) {
|
|
@@ -18,11 +18,11 @@ class ShowSignalSoundHelp extends Action2 {
|
|
|
18
18
|
constructor() {
|
|
19
19
|
super({
|
|
20
20
|
id: ShowSignalSoundHelp.ID,
|
|
21
|
-
title: ( localize2(
|
|
21
|
+
title: ( localize2(5057, "Help: List Signal Sounds")),
|
|
22
22
|
f1: true,
|
|
23
23
|
metadata: {
|
|
24
24
|
description: ( localize(
|
|
25
|
-
|
|
25
|
+
5058,
|
|
26
26
|
"List all accessibility sounds, noises, or audio cues and configure their settings"
|
|
27
27
|
))
|
|
28
28
|
}
|
|
@@ -40,7 +40,7 @@ class ShowSignalSoundHelp extends Action2 {
|
|
|
40
40
|
signal,
|
|
41
41
|
buttons: userGestureSignals.includes(signal) ? [{
|
|
42
42
|
iconClass: ThemeIcon.asClassName(Codicon.settingsGear),
|
|
43
|
-
tooltip: ( localize(
|
|
43
|
+
tooltip: ( localize(5059, "Configure Sound")),
|
|
44
44
|
alwaysVisible: true
|
|
45
45
|
}] : []
|
|
46
46
|
}))).sort((a, b) => a.label.localeCompare(b.label));
|
|
@@ -103,7 +103,7 @@ class ShowSignalSoundHelp extends Action2 {
|
|
|
103
103
|
);
|
|
104
104
|
}));
|
|
105
105
|
disposables.add(qp.onDidHide(() => disposables.dispose()));
|
|
106
|
-
qp.placeholder = ( localize(
|
|
106
|
+
qp.placeholder = ( localize(5060, "Select a sound to play and configure"));
|
|
107
107
|
qp.canSelectMany = true;
|
|
108
108
|
await qp.show();
|
|
109
109
|
}
|
|
@@ -118,11 +118,11 @@ class ShowAccessibilityAnnouncementHelp extends Action2 {
|
|
|
118
118
|
constructor() {
|
|
119
119
|
super({
|
|
120
120
|
id: ShowAccessibilityAnnouncementHelp.ID,
|
|
121
|
-
title: ( localize2(
|
|
121
|
+
title: ( localize2(5061, "Help: List Signal Announcements")),
|
|
122
122
|
f1: true,
|
|
123
123
|
metadata: {
|
|
124
124
|
description: ( localize(
|
|
125
|
-
|
|
125
|
+
5062,
|
|
126
126
|
"List all accessibility announcements, alerts, braille messages, and configure their settings"
|
|
127
127
|
))
|
|
128
128
|
}
|
|
@@ -140,7 +140,7 @@ class ShowAccessibilityAnnouncementHelp extends Action2 {
|
|
|
140
140
|
signal,
|
|
141
141
|
buttons: userGestureSignals.includes(signal) ? [{
|
|
142
142
|
iconClass: ThemeIcon.asClassName(Codicon.settingsGear),
|
|
143
|
-
tooltip: ( localize(
|
|
143
|
+
tooltip: ( localize(5063, "Configure Announcement")),
|
|
144
144
|
alwaysVisible: true
|
|
145
145
|
}] : []
|
|
146
146
|
}))).sort((a, b) => a.label.localeCompare(b.label));
|
|
@@ -194,8 +194,8 @@ class ShowAccessibilityAnnouncementHelp extends Action2 {
|
|
|
194
194
|
});
|
|
195
195
|
}));
|
|
196
196
|
disposables.add(qp.onDidHide(() => disposables.dispose()));
|
|
197
|
-
qp.placeholder = screenReaderOptimized ? ( localize(
|
|
198
|
-
|
|
197
|
+
qp.placeholder = screenReaderOptimized ? ( localize(5064, "Select an announcement to configure")) : ( localize(
|
|
198
|
+
5065,
|
|
199
199
|
"Screen reader is not active, announcements are disabled by default."
|
|
200
200
|
));
|
|
201
201
|
qp.canSelectMany = true;
|
package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/openDiffEditorAnnouncement.js
CHANGED
|
@@ -41,7 +41,7 @@ let DiffEditorActiveAnnouncementContribution = class DiffEditorActiveAnnouncemen
|
|
|
41
41
|
}
|
|
42
42
|
this._onDidActiveEditorChangeListener = this._register(this._editorService.onDidActiveEditorChange(() => {
|
|
43
43
|
if (isDiffEditor(this._editorService.activeTextEditorControl)) {
|
|
44
|
-
this._accessibilityService.alert(( localize(
|
|
44
|
+
this._accessibilityService.alert(( localize(5066, "Diff editor")));
|
|
45
45
|
}
|
|
46
46
|
}));
|
|
47
47
|
}
|
|
@@ -22,10 +22,10 @@ class ToggleScreenReaderMode extends Action2 {
|
|
|
22
22
|
constructor() {
|
|
23
23
|
super({
|
|
24
24
|
id: "editor.action.toggleScreenReaderAccessibilityMode",
|
|
25
|
-
title: ( localize2(
|
|
25
|
+
title: ( localize2(10781, "Toggle Screen Reader Accessibility Mode")),
|
|
26
26
|
metadata: {
|
|
27
27
|
description: ( localize2(
|
|
28
|
-
|
|
28
|
+
10782,
|
|
29
29
|
"Toggles an optimized mode for usage with screen readers, braille devices, and other assistive technologies."
|
|
30
30
|
))
|
|
31
31
|
},
|
|
@@ -62,11 +62,11 @@ class AnnounceCursorPosition extends Action2 {
|
|
|
62
62
|
constructor() {
|
|
63
63
|
super({
|
|
64
64
|
id: "editor.action.announceCursorPosition",
|
|
65
|
-
title: ( localize2(
|
|
65
|
+
title: ( localize2(10783, "Announce Cursor Position")),
|
|
66
66
|
f1: true,
|
|
67
67
|
metadata: {
|
|
68
68
|
description: ( localize2(
|
|
69
|
-
|
|
69
|
+
10784,
|
|
70
70
|
"Announce the current cursor position (line and column) via screen reader."
|
|
71
71
|
))
|
|
72
72
|
},
|
|
@@ -91,7 +91,7 @@ class AnnounceCursorPosition extends Action2 {
|
|
|
91
91
|
const tabSize = model.getOptions().tabSize;
|
|
92
92
|
const lineContent = model.getLineContent(position.lineNumber);
|
|
93
93
|
const visibleColumn = CursorColumns.visibleColumnFromColumn(lineContent, position.column, tabSize) + 1;
|
|
94
|
-
alert(( localize(
|
|
94
|
+
alert(( localize(10785, "Line {0}, Column {1}", position.lineNumber, visibleColumn)));
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
registerAction2(AnnounceCursorPosition);
|