@codingame/monaco-vscode-accessibility-service-override 8.0.4 → 9.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/assets/voiceRecordingStarted.mp3 +0 -0
- package/assets/voiceRecordingStopped.mp3 +0 -0
- package/package.json +3 -2
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityStatus.js +5 -5
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.js +53 -49
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewKeybindingResolver.js +1 -1
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/commands.js +26 -21
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/openDiffEditorAnnouncement.js +1 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/accessibility/accessibility.js +2 -2
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-accessibility-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@9.0.0",
|
|
30
|
+
"marked": "~14.0.0"
|
|
30
31
|
}
|
|
31
32
|
}
|
|
@@ -36,13 +36,13 @@ let AccessibilityStatus = class AccessibilityStatus extends Disposable {
|
|
|
36
36
|
}));
|
|
37
37
|
}
|
|
38
38
|
showScreenReaderNotification() {
|
|
39
|
-
this.screenReaderNotification = this.notificationService.prompt(Severity$1.Info, ( localize(
|
|
40
|
-
label: ( localize(
|
|
39
|
+
this.screenReaderNotification = this.notificationService.prompt(Severity$1.Info, ( localize(5497, "Are you using a screen reader to operate VS Code?")), [{
|
|
40
|
+
label: ( localize(5498, "Yes")),
|
|
41
41
|
run: () => {
|
|
42
42
|
this.configurationService.updateValue('editor.accessibilitySupport', 'on', ConfigurationTarget.USER);
|
|
43
43
|
}
|
|
44
44
|
}, {
|
|
45
|
-
label: ( localize(
|
|
45
|
+
label: ( localize(5499, "No")),
|
|
46
46
|
run: () => {
|
|
47
47
|
this.configurationService.updateValue('editor.accessibilitySupport', 'off', ConfigurationTarget.USER);
|
|
48
48
|
}
|
|
@@ -55,9 +55,9 @@ let AccessibilityStatus = class AccessibilityStatus extends Disposable {
|
|
|
55
55
|
updateScreenReaderModeElement(visible) {
|
|
56
56
|
if (visible) {
|
|
57
57
|
if (!this.screenReaderModeElement.value) {
|
|
58
|
-
const text = ( localize(
|
|
58
|
+
const text = ( localize(5500, "Screen Reader Optimized"));
|
|
59
59
|
this.screenReaderModeElement.value = this.statusbarService.addEntry({
|
|
60
|
-
name: ( localize(
|
|
60
|
+
name: ( localize(5501, "Screen Reader Mode")),
|
|
61
61
|
text,
|
|
62
62
|
ariaLabel: text,
|
|
63
63
|
command: 'showEditorScreenReaderNotification',
|
|
@@ -6,7 +6,7 @@ import { alert } from 'vscode/vscode/vs/base/browser/ui/aria/aria';
|
|
|
6
6
|
import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
7
7
|
import { KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
8
8
|
import { Disposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
9
|
-
import
|
|
9
|
+
import { marked } from 'marked';
|
|
10
10
|
import { isWindows, isMacintosh } from 'vscode/vscode/vs/base/common/platform';
|
|
11
11
|
import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
|
|
12
12
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
@@ -158,11 +158,17 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
158
158
|
}
|
|
159
159
|
return this._editorWidget.getPosition() || undefined;
|
|
160
160
|
}
|
|
161
|
-
setPosition(position, reveal) {
|
|
161
|
+
setPosition(position, reveal, select) {
|
|
162
162
|
this._editorWidget.setPosition(position);
|
|
163
163
|
if (reveal) {
|
|
164
164
|
this._editorWidget.revealPosition(position);
|
|
165
165
|
}
|
|
166
|
+
if (select) {
|
|
167
|
+
const lineLength = this._editorWidget.getModel()?.getLineLength(position.lineNumber) ?? 0;
|
|
168
|
+
if (lineLength) {
|
|
169
|
+
this._editorWidget.setSelection({ startLineNumber: position.lineNumber, startColumn: 1, endLineNumber: position.lineNumber, endColumn: lineLength + 1 });
|
|
170
|
+
}
|
|
171
|
+
}
|
|
166
172
|
}
|
|
167
173
|
getCodeBlockContext() {
|
|
168
174
|
const position = this._editorWidget.getPosition();
|
|
@@ -324,7 +330,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
324
330
|
if (provider.options.language && provider.options.language !== 'markdown') {
|
|
325
331
|
return;
|
|
326
332
|
}
|
|
327
|
-
const markdownTokens =
|
|
333
|
+
const markdownTokens = marked.lexer(this._currentContent);
|
|
328
334
|
if (!markdownTokens) {
|
|
329
335
|
return;
|
|
330
336
|
}
|
|
@@ -344,26 +350,26 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
344
350
|
if (!items) {
|
|
345
351
|
return;
|
|
346
352
|
}
|
|
347
|
-
const
|
|
348
|
-
this.
|
|
353
|
+
const disposables = this._register(( (new DisposableStore())));
|
|
354
|
+
const quickPick = disposables.add(this._quickInputService.createQuickPick());
|
|
349
355
|
quickPick.items = items;
|
|
350
|
-
quickPick.title = ( localize(
|
|
351
|
-
quickPick.placeholder = ( localize(
|
|
356
|
+
quickPick.title = ( localize(1823, 'Configure keybindings'));
|
|
357
|
+
quickPick.placeholder = ( localize(1824, 'Select a command ID to configure a keybinding for it'));
|
|
352
358
|
quickPick.show();
|
|
353
|
-
quickPick.onDidAccept(async () => {
|
|
359
|
+
disposables.add(quickPick.onDidAccept(async () => {
|
|
354
360
|
const item = quickPick.selectedItems[0];
|
|
355
361
|
if (item) {
|
|
356
362
|
await this._commandService.executeCommand('workbench.action.openGlobalKeybindings', item.id);
|
|
357
363
|
}
|
|
358
364
|
quickPick.dispose();
|
|
359
|
-
});
|
|
360
|
-
quickPick.onDidHide(() => {
|
|
365
|
+
}));
|
|
366
|
+
disposables.add(quickPick.onDidHide(() => {
|
|
361
367
|
if (!quickPick.selectedItems.length && provider) {
|
|
362
368
|
this.show(provider);
|
|
363
369
|
}
|
|
364
|
-
|
|
370
|
+
disposables.dispose();
|
|
365
371
|
this._inQuickPick = false;
|
|
366
|
-
});
|
|
372
|
+
}));
|
|
367
373
|
}
|
|
368
374
|
_convertTokensToSymbols(tokens, symbols) {
|
|
369
375
|
let firstListItem;
|
|
@@ -377,18 +383,18 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
377
383
|
label = token.text;
|
|
378
384
|
break;
|
|
379
385
|
case 'list': {
|
|
380
|
-
const firstItem = token.items
|
|
386
|
+
const firstItem = token.items[0];
|
|
381
387
|
if (!firstItem) {
|
|
382
388
|
break;
|
|
383
389
|
}
|
|
384
390
|
firstListItem = `- ${firstItem.text}`;
|
|
385
|
-
label = token.items
|
|
391
|
+
label = ( (token.items.map(i => i.text))).join(', ');
|
|
386
392
|
break;
|
|
387
393
|
}
|
|
388
394
|
}
|
|
389
395
|
}
|
|
390
396
|
if (label) {
|
|
391
|
-
symbols.push({ markdownToParse: label, label: ( localize(
|
|
397
|
+
symbols.push({ markdownToParse: label, label: ( localize(1825, "({0}) {1}", token.type, label)), ariaLabel: ( localize(1826, "({0}) {1}", token.type, label)), firstListItem });
|
|
392
398
|
firstListItem = undefined;
|
|
393
399
|
}
|
|
394
400
|
}
|
|
@@ -420,7 +426,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
420
426
|
}
|
|
421
427
|
this._configurationService.updateValue(this._currentProvider?.verbositySettingKey, false);
|
|
422
428
|
alert(( localize(
|
|
423
|
-
|
|
429
|
+
1827,
|
|
424
430
|
'{0} accessibility verbosity is now disabled',
|
|
425
431
|
this._currentProvider.verbositySettingKey
|
|
426
432
|
)));
|
|
@@ -499,17 +505,17 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
499
505
|
const hasActions = this._accessibleViewSupportsNavigation.get() || this._accessibleViewVerbosityEnabled.get() || this._accessibleViewGoToSymbolSupported.get() || provider.actions?.length;
|
|
500
506
|
if (verbose && !showAccessibleViewHelp && hasActions) {
|
|
501
507
|
actionsHint = provider.options.position ? ( localize(
|
|
502
|
-
|
|
508
|
+
1828,
|
|
503
509
|
'Explore actions such as disabling this hint (Shift+Tab), use Escape to exit this dialog.'
|
|
504
|
-
)) : ( localize(
|
|
510
|
+
)) : ( localize(1829, 'Explore actions such as disabling this hint (Shift+Tab).'));
|
|
505
511
|
}
|
|
506
|
-
let ariaLabel = provider.options.type === AccessibleViewType.Help ? ( localize(
|
|
512
|
+
let ariaLabel = provider.options.type === AccessibleViewType.Help ? ( localize(1830, "Accessibility Help")) : ( localize(1831, "Accessible View"));
|
|
507
513
|
this._title.textContent = ariaLabel;
|
|
508
514
|
if (actionsHint && provider.options.type === AccessibleViewType.View) {
|
|
509
|
-
ariaLabel = ( localize(
|
|
515
|
+
ariaLabel = ( localize(1832, "Accessible View, {0}", actionsHint));
|
|
510
516
|
}
|
|
511
517
|
else if (actionsHint) {
|
|
512
|
-
ariaLabel = ( localize(
|
|
518
|
+
ariaLabel = ( localize(1833, "Accessibility Help, {0}", actionsHint));
|
|
513
519
|
}
|
|
514
520
|
if (isWindows && widgetIsFocused) {
|
|
515
521
|
ariaLabel = '';
|
|
@@ -577,7 +583,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
577
583
|
return disposableStore;
|
|
578
584
|
}
|
|
579
585
|
_updateToolbar(providedActions, type) {
|
|
580
|
-
this._toolbar.setAriaLabel(type === AccessibleViewType.Help ? ( localize(
|
|
586
|
+
this._toolbar.setAriaLabel(type === AccessibleViewType.Help ? ( localize(1834, 'Accessibility Help')) : ( localize(1835, "Accessible View")));
|
|
581
587
|
const menuActions = [];
|
|
582
588
|
const toolbarMenu = this._register(this._menuService.createMenu(MenuId.AccessibleView, this._contextKeyService));
|
|
583
589
|
createAndFillInActionBarActions(toolbarMenu, {}, menuActions);
|
|
@@ -680,9 +686,9 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
680
686
|
_accessibleViewHelpDialogContent(providerHasSymbols) {
|
|
681
687
|
const navigationHint = this._navigationHint();
|
|
682
688
|
const goToSymbolHint = this._goToSymbolHint(providerHasSymbols);
|
|
683
|
-
const toolbarHint = ( localize(
|
|
689
|
+
const toolbarHint = ( localize(1836, "Navigate to the toolbar (Shift+Tab)."));
|
|
684
690
|
const chatHints = this._getChatHints();
|
|
685
|
-
let hint = ( localize(
|
|
691
|
+
let hint = ( localize(1837, "In the accessible view, you can:\n"));
|
|
686
692
|
if (navigationHint) {
|
|
687
693
|
hint += ' - ' + navigationHint + '\n';
|
|
688
694
|
}
|
|
@@ -702,24 +708,24 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
702
708
|
return;
|
|
703
709
|
}
|
|
704
710
|
return [( localize(
|
|
705
|
-
|
|
711
|
+
1838,
|
|
706
712
|
" - Insert the code block at the cursor{0}.",
|
|
707
713
|
'<keybinding:workbench.action.chat.insertCodeBlock>'
|
|
708
714
|
)),
|
|
709
715
|
( localize(
|
|
710
|
-
|
|
716
|
+
1839,
|
|
711
717
|
" - Insert the code block into a new file{0}.",
|
|
712
718
|
'<keybinding:workbench.action.chat.insertIntoNewFile>'
|
|
713
719
|
)),
|
|
714
720
|
( localize(
|
|
715
|
-
|
|
721
|
+
1840,
|
|
716
722
|
" - Run the code block in the terminal{0}.\n",
|
|
717
723
|
'<keybinding:workbench.action.chat.runInTerminal>'
|
|
718
724
|
))].join('\n');
|
|
719
725
|
}
|
|
720
726
|
_navigationHint() {
|
|
721
727
|
return ( localize(
|
|
722
|
-
|
|
728
|
+
1841,
|
|
723
729
|
"Show the next item{0} or previous item{1}.",
|
|
724
730
|
`<keybinding:${AccessibilityCommandId.ShowNext}`,
|
|
725
731
|
`<keybinding:${AccessibilityCommandId.ShowPrevious}>`
|
|
@@ -728,7 +734,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
728
734
|
_disableVerbosityHint(provider) {
|
|
729
735
|
if (provider.options.type === AccessibleViewType.Help && this._verbosityEnabled()) {
|
|
730
736
|
return ( localize(
|
|
731
|
-
|
|
737
|
+
1842,
|
|
732
738
|
"\nDisable accessibility verbosity for this feature{0}.",
|
|
733
739
|
`<keybinding:${AccessibilityCommandId.DisableVerbosityHint}>`
|
|
734
740
|
));
|
|
@@ -740,7 +746,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
740
746
|
return;
|
|
741
747
|
}
|
|
742
748
|
return ( localize(
|
|
743
|
-
|
|
749
|
+
1843,
|
|
744
750
|
'Go to a symbol{0}.',
|
|
745
751
|
`<keybinding:${AccessibilityCommandId.GoToSymbol}>`
|
|
746
752
|
));
|
|
@@ -749,7 +755,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
749
755
|
const configureKb = this._keybindingService.lookupKeybinding(AccessibilityCommandId.AccessibilityHelpConfigureKeybindings)?.getAriaLabel();
|
|
750
756
|
const keybindingToConfigureQuickPick = configureKb ? '(' + configureKb + ')' : 'by assigning a keybinding to the command Accessibility Help Configure Unassigned Keybindings.';
|
|
751
757
|
return ( localize(
|
|
752
|
-
|
|
758
|
+
1844,
|
|
753
759
|
'\nConfigure keybindings for commands that lack them {0}.',
|
|
754
760
|
keybindingToConfigureQuickPick
|
|
755
761
|
));
|
|
@@ -758,7 +764,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
758
764
|
const configureKb = this._keybindingService.lookupKeybinding(AccessibilityCommandId.AccessibilityHelpConfigureAssignedKeybindings)?.getAriaLabel();
|
|
759
765
|
const keybindingToConfigureQuickPick = configureKb ? '(' + configureKb + ')' : 'by assigning a keybinding to the command Accessibility Help Configure Assigned Keybindings.';
|
|
760
766
|
return ( localize(
|
|
761
|
-
|
|
767
|
+
1845,
|
|
762
768
|
'\nConfigure keybindings for commands that already have assignments {0}.',
|
|
763
769
|
keybindingToConfigureQuickPick
|
|
764
770
|
));
|
|
@@ -780,11 +786,11 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
780
786
|
return screenReaderModeHint;
|
|
781
787
|
}
|
|
782
788
|
_exitDialogHint(provider) {
|
|
783
|
-
return this._verbosityEnabled() && !provider.options.position ? ( localize(
|
|
789
|
+
return this._verbosityEnabled() && !provider.options.position ? ( localize(1846, '\nExit this dialog (Escape).')) : '';
|
|
784
790
|
}
|
|
785
791
|
_readMoreHint(provider) {
|
|
786
792
|
return provider.options.readMoreUrl ? ( localize(
|
|
787
|
-
|
|
793
|
+
1847,
|
|
788
794
|
"\nOpen a browser window with more information related to accessibility{0}.",
|
|
789
795
|
`<keybinding:${AccessibilityCommandId.AccessibilityHelpOpenHelpLink}>`
|
|
790
796
|
)) : '';
|
|
@@ -844,11 +850,11 @@ let AccessibleViewService = class AccessibleViewService extends Disposable {
|
|
|
844
850
|
const keybinding = this._keybindingService.lookupKeybinding(AccessibilityCommandId.OpenAccessibleView)?.getAriaLabel();
|
|
845
851
|
let hint = null;
|
|
846
852
|
if (keybinding) {
|
|
847
|
-
hint = ( localize(
|
|
853
|
+
hint = ( localize(1848, "Inspect this in the accessible view with {0}", keybinding));
|
|
848
854
|
}
|
|
849
855
|
else {
|
|
850
856
|
hint = ( localize(
|
|
851
|
-
|
|
857
|
+
1849,
|
|
852
858
|
"Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."
|
|
853
859
|
));
|
|
854
860
|
}
|
|
@@ -867,12 +873,8 @@ let AccessibleViewService = class AccessibleViewService extends Disposable {
|
|
|
867
873
|
const lastLine = this._accessibleView?.editorWidget.getModel()?.getLineCount();
|
|
868
874
|
return lastLine !== undefined && lastLine > 0 ? ( (new Position(lastLine, 1))) : undefined;
|
|
869
875
|
}
|
|
870
|
-
setPosition(position, reveal) {
|
|
871
|
-
|
|
872
|
-
editorWidget?.setPosition(position);
|
|
873
|
-
if (reveal) {
|
|
874
|
-
editorWidget?.revealLine(position.lineNumber);
|
|
875
|
-
}
|
|
876
|
+
setPosition(position, reveal, select) {
|
|
877
|
+
this._accessibleView?.setPosition(position, reveal, select);
|
|
876
878
|
}
|
|
877
879
|
getCodeBlockContext() {
|
|
878
880
|
return this._accessibleView?.getCodeBlockContext();
|
|
@@ -892,9 +894,10 @@ let AccessibleViewSymbolQuickPick = class AccessibleViewSymbolQuickPick {
|
|
|
892
894
|
this._quickInputService = _quickInputService;
|
|
893
895
|
}
|
|
894
896
|
show(provider) {
|
|
895
|
-
const
|
|
896
|
-
quickPick
|
|
897
|
-
quickPick.
|
|
897
|
+
const disposables = ( (new DisposableStore()));
|
|
898
|
+
const quickPick = disposables.add(this._quickInputService.createQuickPick());
|
|
899
|
+
quickPick.placeholder = ( localize(1850, "Type to search symbols"));
|
|
900
|
+
quickPick.title = ( localize(1851, "Go to Symbol Accessible View"));
|
|
898
901
|
const symbols = this._accessibleView.getSymbols();
|
|
899
902
|
if (!symbols) {
|
|
900
903
|
return;
|
|
@@ -904,15 +907,16 @@ let AccessibleViewSymbolQuickPick = class AccessibleViewSymbolQuickPick {
|
|
|
904
907
|
quickPick.canSelectMany = false;
|
|
905
908
|
quickPick.items = symbols;
|
|
906
909
|
quickPick.show();
|
|
907
|
-
quickPick.onDidAccept(() => {
|
|
910
|
+
disposables.add(quickPick.onDidAccept(() => {
|
|
908
911
|
this._accessibleView.showSymbol(provider, quickPick.selectedItems[0]);
|
|
909
912
|
quickPick.hide();
|
|
910
|
-
});
|
|
911
|
-
quickPick.onDidHide(() => {
|
|
913
|
+
}));
|
|
914
|
+
disposables.add(quickPick.onDidHide(() => {
|
|
912
915
|
if (quickPick.selectedItems.length === 0) {
|
|
913
916
|
this._accessibleView.show(provider);
|
|
914
917
|
}
|
|
915
|
-
|
|
918
|
+
disposables.dispose();
|
|
919
|
+
}));
|
|
916
920
|
}
|
|
917
921
|
};
|
|
918
922
|
AccessibleViewSymbolQuickPick = ( (__decorate([
|
package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewKeybindingResolver.js
CHANGED
|
@@ -6,7 +6,7 @@ function resolveContentAndKeybindingItems(keybindingService, value) {
|
|
|
6
6
|
}
|
|
7
7
|
const configureKeybindingItems = [];
|
|
8
8
|
const configuredKeybindingItems = [];
|
|
9
|
-
const matches = value.matchAll(
|
|
9
|
+
const matches = value.matchAll(/(\<keybinding:(?<commandId>[^\<]*)\>)/gm);
|
|
10
10
|
for (const match of [...matches]) {
|
|
11
11
|
const commandId = match?.groups?.commandId;
|
|
12
12
|
let kbLabel;
|
|
@@ -8,17 +8,18 @@ import { IAccessibilitySignalService } from 'vscode/vscode/vs/platform/accessibi
|
|
|
8
8
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
9
9
|
import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
10
10
|
import { IPreferencesService } from 'vscode/vscode/vs/workbench/services/preferences/common/preferences.service';
|
|
11
|
+
import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
11
12
|
|
|
12
13
|
class ShowSignalSoundHelp extends Action2 {
|
|
13
14
|
static { this.ID = 'signals.sounds.help'; }
|
|
14
15
|
constructor() {
|
|
15
16
|
super({
|
|
16
17
|
id: ShowSignalSoundHelp.ID,
|
|
17
|
-
title: ( localize2(
|
|
18
|
+
title: ( localize2(5503, "Help: List Signal Sounds")),
|
|
18
19
|
f1: true,
|
|
19
20
|
metadata: {
|
|
20
21
|
description: ( localize(
|
|
21
|
-
|
|
22
|
+
5504,
|
|
22
23
|
"List all accessibility sounds, noises, or audio cues and configure their settings"
|
|
23
24
|
))
|
|
24
25
|
}
|
|
@@ -36,14 +37,15 @@ class ShowSignalSoundHelp extends Action2 {
|
|
|
36
37
|
signal,
|
|
37
38
|
buttons: userGestureSignals.includes(signal) ? [{
|
|
38
39
|
iconClass: ThemeIcon.asClassName(Codicon.settingsGear),
|
|
39
|
-
tooltip: ( localize(
|
|
40
|
+
tooltip: ( localize(5505, 'Configure Sound')),
|
|
40
41
|
alwaysVisible: true
|
|
41
42
|
}] : []
|
|
42
43
|
})))).sort((a, b) => a.label.localeCompare(b.label));
|
|
43
|
-
const
|
|
44
|
+
const disposables = ( (new DisposableStore()));
|
|
45
|
+
const qp = disposables.add(quickInputService.createQuickPick());
|
|
44
46
|
qp.items = items;
|
|
45
47
|
qp.selectedItems = items.filter(i => accessibilitySignalService.isSoundEnabled(i.signal) || userGestureSignals.includes(i.signal) && configurationService.getValue(i.signal.settingsKey + '.sound') !== 'never');
|
|
46
|
-
qp.onDidAccept(() => {
|
|
48
|
+
disposables.add(qp.onDidAccept(() => {
|
|
47
49
|
const enabledSounds = ( (qp.selectedItems.map(i => i.signal)));
|
|
48
50
|
const disabledSounds = ( (qp.items.map(i => i.signal))).filter(i => !enabledSounds.includes(i));
|
|
49
51
|
for (const signal of enabledSounds) {
|
|
@@ -63,14 +65,15 @@ class ShowSignalSoundHelp extends Action2 {
|
|
|
63
65
|
configurationService.updateValue(signal.settingsKey, value);
|
|
64
66
|
}
|
|
65
67
|
qp.hide();
|
|
66
|
-
});
|
|
67
|
-
qp.onDidTriggerItemButton(e => {
|
|
68
|
+
}));
|
|
69
|
+
disposables.add(qp.onDidTriggerItemButton(e => {
|
|
68
70
|
preferencesService.openUserSettings({ jsonEditor: true, revealSetting: { key: e.item.signal.settingsKey, edit: true } });
|
|
69
|
-
});
|
|
70
|
-
qp.onDidChangeActive(() => {
|
|
71
|
+
}));
|
|
72
|
+
disposables.add(qp.onDidChangeActive(() => {
|
|
71
73
|
accessibilitySignalService.playSound(qp.activeItems[0].signal.sound.getSound(true), true, AcknowledgeDocCommentsToken);
|
|
72
|
-
});
|
|
73
|
-
qp.
|
|
74
|
+
}));
|
|
75
|
+
disposables.add(qp.onDidHide(() => disposables.dispose()));
|
|
76
|
+
qp.placeholder = ( localize(5506, 'Select a sound to play and configure'));
|
|
74
77
|
qp.canSelectMany = true;
|
|
75
78
|
await qp.show();
|
|
76
79
|
}
|
|
@@ -83,11 +86,11 @@ class ShowAccessibilityAnnouncementHelp extends Action2 {
|
|
|
83
86
|
constructor() {
|
|
84
87
|
super({
|
|
85
88
|
id: ShowAccessibilityAnnouncementHelp.ID,
|
|
86
|
-
title: ( localize2(
|
|
89
|
+
title: ( localize2(5507, "Help: List Signal Announcements")),
|
|
87
90
|
f1: true,
|
|
88
91
|
metadata: {
|
|
89
92
|
description: ( localize(
|
|
90
|
-
|
|
93
|
+
5508,
|
|
91
94
|
"List all accessibility announcements, alerts, braille messages, and configure their settings"
|
|
92
95
|
))
|
|
93
96
|
}
|
|
@@ -105,15 +108,16 @@ class ShowAccessibilityAnnouncementHelp extends Action2 {
|
|
|
105
108
|
signal,
|
|
106
109
|
buttons: userGestureSignals.includes(signal) ? [{
|
|
107
110
|
iconClass: ThemeIcon.asClassName(Codicon.settingsGear),
|
|
108
|
-
tooltip: ( localize(
|
|
111
|
+
tooltip: ( localize(5509, 'Configure Announcement')),
|
|
109
112
|
alwaysVisible: true,
|
|
110
113
|
}] : []
|
|
111
114
|
})))).sort((a, b) => a.label.localeCompare(b.label));
|
|
112
|
-
const
|
|
115
|
+
const disposables = ( (new DisposableStore()));
|
|
116
|
+
const qp = disposables.add(quickInputService.createQuickPick());
|
|
113
117
|
qp.items = items;
|
|
114
118
|
qp.selectedItems = items.filter(i => accessibilitySignalService.isAnnouncementEnabled(i.signal) || userGestureSignals.includes(i.signal) && configurationService.getValue(i.signal.settingsKey + '.announcement') !== 'never');
|
|
115
119
|
const screenReaderOptimized = accessibilityService.isScreenReaderOptimized();
|
|
116
|
-
qp.onDidAccept(() => {
|
|
120
|
+
disposables.add(qp.onDidAccept(() => {
|
|
117
121
|
if (!screenReaderOptimized) {
|
|
118
122
|
qp.hide();
|
|
119
123
|
return;
|
|
@@ -132,12 +136,13 @@ class ShowAccessibilityAnnouncementHelp extends Action2 {
|
|
|
132
136
|
configurationService.updateValue(signal.settingsKey, value);
|
|
133
137
|
}
|
|
134
138
|
qp.hide();
|
|
135
|
-
});
|
|
136
|
-
qp.onDidTriggerItemButton(e => {
|
|
139
|
+
}));
|
|
140
|
+
disposables.add(qp.onDidTriggerItemButton(e => {
|
|
137
141
|
preferencesService.openUserSettings({ jsonEditor: true, revealSetting: { key: e.item.signal.settingsKey, edit: true } });
|
|
138
|
-
});
|
|
139
|
-
qp.
|
|
140
|
-
|
|
142
|
+
}));
|
|
143
|
+
disposables.add(qp.onDidHide(() => disposables.dispose()));
|
|
144
|
+
qp.placeholder = screenReaderOptimized ? ( localize(5510, 'Select an announcement to configure')) : ( localize(
|
|
145
|
+
5511,
|
|
141
146
|
'Screen reader is not active, announcements are disabled by default.'
|
|
142
147
|
));
|
|
143
148
|
qp.canSelectMany = true;
|
package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/openDiffEditorAnnouncement.js
CHANGED
|
@@ -35,7 +35,7 @@ let DiffEditorActiveAnnouncementContribution = class DiffEditorActiveAnnouncemen
|
|
|
35
35
|
}
|
|
36
36
|
this._onDidActiveEditorChangeListener = this._register(this._editorService.onDidActiveEditorChange(() => {
|
|
37
37
|
if (isDiffEditor(this._editorService.activeTextEditorControl)) {
|
|
38
|
-
this._accessibilityService.alert(( localize(
|
|
38
|
+
this._accessibilityService.alert(( localize(5502, "Diff editor")));
|
|
39
39
|
}
|
|
40
40
|
}));
|
|
41
41
|
}
|
|
@@ -14,10 +14,10 @@ class ToggleScreenReaderMode extends Action2 {
|
|
|
14
14
|
constructor() {
|
|
15
15
|
super({
|
|
16
16
|
id: 'editor.action.toggleScreenReaderAccessibilityMode',
|
|
17
|
-
title: ( localize2(
|
|
17
|
+
title: ( localize2(1852, "Toggle Screen Reader Accessibility Mode")),
|
|
18
18
|
metadata: {
|
|
19
19
|
description: ( localize2(
|
|
20
|
-
|
|
20
|
+
1853,
|
|
21
21
|
"Toggles an optimized mode for usage with screen readers, braille devices, and other assistive technologies."
|
|
22
22
|
)),
|
|
23
23
|
},
|