@codingame/monaco-vscode-accessibility-service-override 9.0.2 → 10.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/accessibility.contribution.js +11 -13
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityStatus.js +8 -10
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.js +61 -70
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewContributions.js +1 -2
- package/vscode/src/vs/workbench/contrib/accessibility/browser/extensionAccesibilityHelp.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/accessibility/browser/unfocusedViewDimmingContribution.js +3 -4
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution.js +3 -4
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignalDebuggerContribution.js +3 -2
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/commands.js +9 -9
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/editorTextPropertySignalsContribution.js +6 -6
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/openDiffEditorAnnouncement.js +3 -4
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/saveAccessibilitySignal.js +1 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/accessibility/accessibility.js +8 -11
- package/vscode/src/vs/workbench/services/accessibility/common/accessibleViewInformationService.js +1 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-accessibility-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@10.0.0",
|
|
30
30
|
"marked": "~14.0.0"
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
2
1
|
import { registerAccessibilityConfiguration, DynamicSpeechAccessibilityConfiguration } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
3
|
-
import { Extensions, registerWorkbenchContribution2
|
|
4
|
-
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
2
|
+
import { Extensions, registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
5
3
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
6
4
|
import { UnfocusedViewDimmingContribution } from './unfocusedViewDimmingContribution.js';
|
|
7
5
|
import { AccessibilityStatus } from './accessibilityStatus.js';
|
|
@@ -17,13 +15,13 @@ import { ExtensionAccessibilityHelpDialogContribution } from './extensionAccesib
|
|
|
17
15
|
|
|
18
16
|
registerAccessibilityConfiguration();
|
|
19
17
|
const workbenchRegistry = ( Registry.as(Extensions.Workbench));
|
|
20
|
-
workbenchRegistry.registerWorkbenchContribution(EditorAccessibilityHelpContribution,
|
|
21
|
-
workbenchRegistry.registerWorkbenchContribution(UnfocusedViewDimmingContribution,
|
|
22
|
-
workbenchRegistry.registerWorkbenchContribution(AccesibleViewHelpContribution,
|
|
23
|
-
workbenchRegistry.registerWorkbenchContribution(AccesibleViewContributions,
|
|
24
|
-
registerWorkbenchContribution2(AccessibilityStatus.ID, AccessibilityStatus,
|
|
25
|
-
registerWorkbenchContribution2(ExtensionAccessibilityHelpDialogContribution.ID, ExtensionAccessibilityHelpDialogContribution,
|
|
26
|
-
registerWorkbenchContribution2(SaveAccessibilitySignalContribution.ID, SaveAccessibilitySignalContribution,
|
|
27
|
-
registerWorkbenchContribution2(SpeechAccessibilitySignalContribution.ID, SpeechAccessibilitySignalContribution,
|
|
28
|
-
registerWorkbenchContribution2(DiffEditorActiveAnnouncementContribution.ID, DiffEditorActiveAnnouncementContribution,
|
|
29
|
-
registerWorkbenchContribution2(DynamicSpeechAccessibilityConfiguration.ID, DynamicSpeechAccessibilityConfiguration,
|
|
18
|
+
workbenchRegistry.registerWorkbenchContribution(EditorAccessibilityHelpContribution, 4 );
|
|
19
|
+
workbenchRegistry.registerWorkbenchContribution(UnfocusedViewDimmingContribution, 3 );
|
|
20
|
+
workbenchRegistry.registerWorkbenchContribution(AccesibleViewHelpContribution, 4 );
|
|
21
|
+
workbenchRegistry.registerWorkbenchContribution(AccesibleViewContributions, 4 );
|
|
22
|
+
registerWorkbenchContribution2(AccessibilityStatus.ID, AccessibilityStatus, 2 );
|
|
23
|
+
registerWorkbenchContribution2(ExtensionAccessibilityHelpDialogContribution.ID, ExtensionAccessibilityHelpDialogContribution, 2 );
|
|
24
|
+
registerWorkbenchContribution2(SaveAccessibilitySignalContribution.ID, SaveAccessibilitySignalContribution, 3 );
|
|
25
|
+
registerWorkbenchContribution2(SpeechAccessibilitySignalContribution.ID, SpeechAccessibilitySignalContribution, 3 );
|
|
26
|
+
registerWorkbenchContribution2(DiffEditorActiveAnnouncementContribution.ID, DiffEditorActiveAnnouncementContribution, 3 );
|
|
27
|
+
registerWorkbenchContribution2(DynamicSpeechAccessibilityConfiguration.ID, DynamicSpeechAccessibilityConfiguration, 3 );
|
|
@@ -5,11 +5,9 @@ import Severity$1 from 'vscode/vscode/vs/base/common/severity';
|
|
|
5
5
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
6
6
|
import { IAccessibilityService } from 'vscode/vscode/vs/platform/accessibility/common/accessibility.service';
|
|
7
7
|
import { CommandsRegistry } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
8
|
-
import { ConfigurationTarget } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
9
8
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
10
9
|
import { NotificationPriority } from 'vscode/vscode/vs/platform/notification/common/notification';
|
|
11
10
|
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
|
|
12
|
-
import { StatusbarAlignment } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar';
|
|
13
11
|
import { IStatusbarService } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar.service';
|
|
14
12
|
|
|
15
13
|
let AccessibilityStatus = class AccessibilityStatus extends Disposable {
|
|
@@ -36,15 +34,15 @@ let AccessibilityStatus = class AccessibilityStatus extends Disposable {
|
|
|
36
34
|
}));
|
|
37
35
|
}
|
|
38
36
|
showScreenReaderNotification() {
|
|
39
|
-
this.screenReaderNotification = this.notificationService.prompt(Severity$1.Info, ( localize(
|
|
40
|
-
label: ( localize(
|
|
37
|
+
this.screenReaderNotification = this.notificationService.prompt(Severity$1.Info, ( localize(5580, "Are you using a screen reader to operate VS Code?")), [{
|
|
38
|
+
label: ( localize(5581, "Yes")),
|
|
41
39
|
run: () => {
|
|
42
|
-
this.configurationService.updateValue('editor.accessibilitySupport', 'on',
|
|
40
|
+
this.configurationService.updateValue('editor.accessibilitySupport', 'on', 2 );
|
|
43
41
|
}
|
|
44
42
|
}, {
|
|
45
|
-
label: ( localize(
|
|
43
|
+
label: ( localize(5582, "No")),
|
|
46
44
|
run: () => {
|
|
47
|
-
this.configurationService.updateValue('editor.accessibilitySupport', 'off',
|
|
45
|
+
this.configurationService.updateValue('editor.accessibilitySupport', 'off', 2 );
|
|
48
46
|
}
|
|
49
47
|
}], {
|
|
50
48
|
sticky: true,
|
|
@@ -55,15 +53,15 @@ let AccessibilityStatus = class AccessibilityStatus extends Disposable {
|
|
|
55
53
|
updateScreenReaderModeElement(visible) {
|
|
56
54
|
if (visible) {
|
|
57
55
|
if (!this.screenReaderModeElement.value) {
|
|
58
|
-
const text = ( localize(
|
|
56
|
+
const text = ( localize(5583, "Screen Reader Optimized"));
|
|
59
57
|
this.screenReaderModeElement.value = this.statusbarService.addEntry({
|
|
60
|
-
name: ( localize(
|
|
58
|
+
name: ( localize(5584, "Screen Reader Mode")),
|
|
61
59
|
text,
|
|
62
60
|
ariaLabel: text,
|
|
63
61
|
command: 'showEditorScreenReaderNotification',
|
|
64
62
|
kind: 'prominent',
|
|
65
63
|
showInAllWindows: true
|
|
66
|
-
}, 'status.editor.screenReaderMode',
|
|
64
|
+
}, 'status.editor.screenReaderMode', 1 , 100.6);
|
|
67
65
|
}
|
|
68
66
|
}
|
|
69
67
|
else {
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { getActiveWindow, addDisposableListener, EventType, isActiveElement } from 'vscode/vscode/vs/base/browser/dom';
|
|
3
3
|
import { StandardKeyboardEvent } from 'vscode/vscode/vs/base/browser/keyboardEvent';
|
|
4
|
-
import { ActionsOrientation } from 'vscode/vscode/vs/base/browser/ui/actionbar/actionbar';
|
|
5
4
|
import { alert } from 'vscode/vscode/vs/base/browser/ui/aria/aria';
|
|
6
5
|
import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
7
|
-
import { KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
8
6
|
import { Disposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
9
7
|
import { marked } from 'marked';
|
|
10
8
|
import { isWindows, isMacintosh } from 'vscode/vscode/vs/base/common/platform';
|
|
@@ -17,7 +15,7 @@ import { IModelService } from 'vscode/vscode/vs/editor/common/services/model';
|
|
|
17
15
|
import { AccessibilityHelpNLS } from 'vscode/vscode/vs/editor/common/standaloneStrings';
|
|
18
16
|
import { CodeActionController } from 'vscode/vscode/vs/editor/contrib/codeAction/browser/codeActionController';
|
|
19
17
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
20
|
-
import { AccessibleContentProvider,
|
|
18
|
+
import { AccessibleContentProvider, ExtensionContentProvider } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleView';
|
|
21
19
|
import { ACCESSIBLE_VIEW_SHOWN_STORAGE_PREFIX } from 'vscode/vscode/vs/platform/accessibility/common/accessibility';
|
|
22
20
|
import { IAccessibilityService } from 'vscode/vscode/vs/platform/accessibility/common/accessibility.service';
|
|
23
21
|
import { createAndFillInActionBarActions } from 'vscode/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
|
|
@@ -30,22 +28,15 @@ import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/
|
|
|
30
28
|
import { IContextViewService } from 'vscode/vscode/vs/platform/contextview/browser/contextView.service';
|
|
31
29
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
32
30
|
import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
33
|
-
import { ResultKind } from 'vscode/vscode/vs/platform/keybinding/common/keybindingResolver';
|
|
34
31
|
import { ILayoutService } from 'vscode/vscode/vs/platform/layout/browser/layoutService.service';
|
|
35
32
|
import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener.service';
|
|
36
33
|
import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
37
|
-
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
38
34
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
39
|
-
import { accessibilityHelpIsShown, accessibleViewIsShown, accessibleViewSupportsNavigation, accessibleViewVerbosityEnabled, accessibleViewGoToSymbolSupported, accessibleViewCurrentProviderId, accessibleViewInCodeBlock, accessibleViewContainsCodeBlocks, accessibleViewOnLastLine, accessibleViewHasUnassignedKeybindings, accessibleViewHasAssignedKeybindings
|
|
35
|
+
import { accessibilityHelpIsShown, accessibleViewIsShown, accessibleViewSupportsNavigation, accessibleViewVerbosityEnabled, accessibleViewGoToSymbolSupported, accessibleViewCurrentProviderId, accessibleViewInCodeBlock, accessibleViewContainsCodeBlocks, accessibleViewOnLastLine, accessibleViewHasUnassignedKeybindings, accessibleViewHasAssignedKeybindings } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
40
36
|
import { resolveContentAndKeybindingItems } from './accessibleViewKeybindingResolver.js';
|
|
41
|
-
import { AccessibilityCommandId } from 'vscode/vscode/vs/workbench/contrib/accessibility/common/accessibilityCommands';
|
|
42
37
|
import { IChatCodeBlockContextProviderService } from 'vscode/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
43
38
|
import { getSimpleEditorOptions } from 'vscode/vscode/vs/workbench/contrib/codeEditor/browser/simpleEditorOptions';
|
|
44
39
|
|
|
45
|
-
var DIMENSIONS;
|
|
46
|
-
( ((function(DIMENSIONS) {
|
|
47
|
-
DIMENSIONS[DIMENSIONS["MAX_WIDTH"] = 600] = "MAX_WIDTH";
|
|
48
|
-
})(DIMENSIONS || (DIMENSIONS = {}))));
|
|
49
40
|
let AccessibleView = class AccessibleView extends Disposable {
|
|
50
41
|
get editorWidget() { return this._editorWidget; }
|
|
51
42
|
constructor(_openerService, _instantiationService, _configurationService, _modelService, _contextViewService, _contextKeyService, _accessibilityService, _keybindingService, _layoutService, _menuService, _commandService, _codeBlockContextProviderService, _storageService, _quickInputService) {
|
|
@@ -78,7 +69,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
78
69
|
this._hasAssignedKeybindings = accessibleViewHasAssignedKeybindings.bindTo(this._contextKeyService);
|
|
79
70
|
this._container = document.createElement('div');
|
|
80
71
|
this._container.classList.add('accessible-view');
|
|
81
|
-
if (this._configurationService.getValue(
|
|
72
|
+
if (this._configurationService.getValue("accessibility.hideAccessibleView" )) {
|
|
82
73
|
this._container.classList.add('hide');
|
|
83
74
|
}
|
|
84
75
|
const codeEditorWidgetOptions = {
|
|
@@ -93,7 +84,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
93
84
|
actionBar.classList.add('accessible-view-action-bar');
|
|
94
85
|
titleBar.appendChild(actionBar);
|
|
95
86
|
this._container.appendChild(titleBar);
|
|
96
|
-
this._toolbar = this._register(_instantiationService.createInstance(WorkbenchToolBar, actionBar, { orientation:
|
|
87
|
+
this._toolbar = this._register(_instantiationService.createInstance(WorkbenchToolBar, actionBar, { orientation: 0 }));
|
|
97
88
|
this._toolbar.context = { viewId: 'accessibleView' };
|
|
98
89
|
const toolbarElt = this._toolbar.getElement();
|
|
99
90
|
toolbarElt.tabIndex = 0;
|
|
@@ -126,8 +117,8 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
126
117
|
this._accessibleViewVerbosityEnabled.set(this._configurationService.getValue(this._currentProvider.verbositySettingKey));
|
|
127
118
|
this._updateToolbar(this._currentProvider.actions, this._currentProvider.options.type);
|
|
128
119
|
}
|
|
129
|
-
if (e.affectsConfiguration(
|
|
130
|
-
this._container.classList.toggle('hide', this._configurationService.getValue(
|
|
120
|
+
if (e.affectsConfiguration("accessibility.hideAccessibleView" )) {
|
|
121
|
+
this._container.classList.toggle('hide', this._configurationService.getValue("accessibility.hideAccessibleView" ));
|
|
131
122
|
}
|
|
132
123
|
}));
|
|
133
124
|
this._register(this._editorWidget.onDidDispose(() => this._resetContextKeys()));
|
|
@@ -213,7 +204,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
213
204
|
}
|
|
214
205
|
provider.onOpen?.();
|
|
215
206
|
const delegate = {
|
|
216
|
-
getAnchor: () => { return { x: (getActiveWindow().innerWidth / 2) - ((Math.min(this._layoutService.activeContainerDimension.width * 0.62 ,
|
|
207
|
+
getAnchor: () => { return { x: (getActiveWindow().innerWidth / 2) - ((Math.min(this._layoutService.activeContainerDimension.width * 0.62 , 600 )) / 2), y: this._layoutService.activeContainerOffset.quickPickTop }; },
|
|
217
208
|
render: (container) => {
|
|
218
209
|
this._viewContainer = container;
|
|
219
210
|
this._viewContainer.classList.add('accessible-view-container');
|
|
@@ -248,11 +239,11 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
248
239
|
if (provider.options.id) {
|
|
249
240
|
this._lastProvider = provider;
|
|
250
241
|
}
|
|
251
|
-
if (provider.id ===
|
|
242
|
+
if (provider.id === "panelChat" ) {
|
|
252
243
|
this._register(this._codeBlockContextProviderService.registerProvider({ getCodeBlockContext: () => this.getCodeBlockContext() }, 'accessibleView'));
|
|
253
244
|
}
|
|
254
245
|
if (provider instanceof ExtensionContentProvider) {
|
|
255
|
-
this._storageService.store(`${ACCESSIBLE_VIEW_SHOWN_STORAGE_PREFIX}${provider.id}`, true,
|
|
246
|
+
this._storageService.store(`${ACCESSIBLE_VIEW_SHOWN_STORAGE_PREFIX}${provider.id}`, true, -1 , 0 );
|
|
256
247
|
}
|
|
257
248
|
if (provider.onDidChangeContent) {
|
|
258
249
|
this._register(provider.onDidChangeContent(() => {
|
|
@@ -280,7 +271,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
280
271
|
if (!this._currentProvider) {
|
|
281
272
|
return false;
|
|
282
273
|
}
|
|
283
|
-
return this._currentProvider instanceof AccessibleContentProvider ? this._configurationService.getValue(this._currentProvider.verbositySettingKey) === true : this._storageService.getBoolean(`${ACCESSIBLE_VIEW_SHOWN_STORAGE_PREFIX}${this._currentProvider.id}`,
|
|
274
|
+
return this._currentProvider instanceof AccessibleContentProvider ? this._configurationService.getValue(this._currentProvider.verbositySettingKey) === true : this._storageService.getBoolean(`${ACCESSIBLE_VIEW_SHOWN_STORAGE_PREFIX}${this._currentProvider.id}`, -1 , false);
|
|
284
275
|
}
|
|
285
276
|
goToSymbol() {
|
|
286
277
|
if (!this._currentProvider) {
|
|
@@ -292,7 +283,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
292
283
|
if (!markdown) {
|
|
293
284
|
return;
|
|
294
285
|
}
|
|
295
|
-
if (this._currentProvider?.id !==
|
|
286
|
+
if (this._currentProvider?.id !== "panelChat" ) {
|
|
296
287
|
return;
|
|
297
288
|
}
|
|
298
289
|
if (this._currentProvider.options.language && this._currentProvider.options.language !== 'markdown') {
|
|
@@ -353,8 +344,8 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
353
344
|
const disposables = this._register(( (new DisposableStore())));
|
|
354
345
|
const quickPick = disposables.add(this._quickInputService.createQuickPick());
|
|
355
346
|
quickPick.items = items;
|
|
356
|
-
quickPick.title = ( localize(
|
|
357
|
-
quickPick.placeholder = ( localize(
|
|
347
|
+
quickPick.title = ( localize(2262, 'Configure keybindings'));
|
|
348
|
+
quickPick.placeholder = ( localize(2263, 'Select a command ID to configure a keybinding for it'));
|
|
358
349
|
quickPick.show();
|
|
359
350
|
disposables.add(quickPick.onDidAccept(async () => {
|
|
360
351
|
const item = quickPick.selectedItems[0];
|
|
@@ -394,7 +385,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
394
385
|
}
|
|
395
386
|
}
|
|
396
387
|
if (label) {
|
|
397
|
-
symbols.push({ markdownToParse: label, label: ( localize(
|
|
388
|
+
symbols.push({ markdownToParse: label, label: ( localize(2264, "({0}) {1}", token.type, label)), ariaLabel: ( localize(2265, "({0}) {1}", token.type, label)), firstListItem });
|
|
398
389
|
firstListItem = undefined;
|
|
399
390
|
}
|
|
400
391
|
}
|
|
@@ -426,13 +417,13 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
426
417
|
}
|
|
427
418
|
this._configurationService.updateValue(this._currentProvider?.verbositySettingKey, false);
|
|
428
419
|
alert(( localize(
|
|
429
|
-
|
|
420
|
+
2266,
|
|
430
421
|
'{0} accessibility verbosity is now disabled',
|
|
431
422
|
this._currentProvider.verbositySettingKey
|
|
432
423
|
)));
|
|
433
424
|
}
|
|
434
425
|
_updateContextKeys(provider, shown) {
|
|
435
|
-
if (provider.options.type ===
|
|
426
|
+
if (provider.options.type === "help" ) {
|
|
436
427
|
this._accessiblityHelpIsShown.set(shown);
|
|
437
428
|
this._accessibleViewIsShown.reset();
|
|
438
429
|
}
|
|
@@ -446,7 +437,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
446
437
|
}
|
|
447
438
|
_updateContent(provider, updatedContent) {
|
|
448
439
|
let content = updatedContent ?? provider.provideContent();
|
|
449
|
-
if (provider.options.type ===
|
|
440
|
+
if (provider.options.type === "view" ) {
|
|
450
441
|
this._currentContent = content;
|
|
451
442
|
this._hasUnassignedKeybindings.reset();
|
|
452
443
|
this._hasAssignedKeybindings.reset();
|
|
@@ -505,17 +496,17 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
505
496
|
const hasActions = this._accessibleViewSupportsNavigation.get() || this._accessibleViewVerbosityEnabled.get() || this._accessibleViewGoToSymbolSupported.get() || provider.actions?.length;
|
|
506
497
|
if (verbose && !showAccessibleViewHelp && hasActions) {
|
|
507
498
|
actionsHint = provider.options.position ? ( localize(
|
|
508
|
-
|
|
499
|
+
2267,
|
|
509
500
|
'Explore actions such as disabling this hint (Shift+Tab), use Escape to exit this dialog.'
|
|
510
|
-
)) : ( localize(
|
|
501
|
+
)) : ( localize(2268, 'Explore actions such as disabling this hint (Shift+Tab).'));
|
|
511
502
|
}
|
|
512
|
-
let ariaLabel = provider.options.type ===
|
|
503
|
+
let ariaLabel = provider.options.type === "help" ? ( localize(2269, "Accessibility Help")) : ( localize(2270, "Accessible View"));
|
|
513
504
|
this._title.textContent = ariaLabel;
|
|
514
|
-
if (actionsHint && provider.options.type ===
|
|
515
|
-
ariaLabel = ( localize(
|
|
505
|
+
if (actionsHint && provider.options.type === "view" ) {
|
|
506
|
+
ariaLabel = ( localize(2271, "Accessible View, {0}", actionsHint));
|
|
516
507
|
}
|
|
517
508
|
else if (actionsHint) {
|
|
518
|
-
ariaLabel = ( localize(
|
|
509
|
+
ariaLabel = ( localize(2272, "Accessibility Help, {0}", actionsHint));
|
|
519
510
|
}
|
|
520
511
|
if (isWindows && widgetIsFocused) {
|
|
521
512
|
ariaLabel = '';
|
|
@@ -550,13 +541,13 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
550
541
|
};
|
|
551
542
|
const disposableStore = ( (new DisposableStore()));
|
|
552
543
|
disposableStore.add(this._editorWidget.onKeyDown((e) => {
|
|
553
|
-
if (e.keyCode ===
|
|
544
|
+
if (e.keyCode === 3 ) {
|
|
554
545
|
this._commandService.executeCommand('editor.action.openLink');
|
|
555
546
|
}
|
|
556
|
-
else if (e.keyCode ===
|
|
547
|
+
else if (e.keyCode === 9 || shouldHide(e.browserEvent, this._keybindingService, this._configurationService)) {
|
|
557
548
|
hide(e);
|
|
558
549
|
}
|
|
559
|
-
else if (e.keyCode ===
|
|
550
|
+
else if (e.keyCode === 38 && provider.options.readMoreUrl) {
|
|
560
551
|
const url = provider.options.readMoreUrl;
|
|
561
552
|
alert(AccessibilityHelpNLS.openingDocs);
|
|
562
553
|
this._openerService.open(( (URI.parse(url))));
|
|
@@ -569,7 +560,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
569
560
|
}));
|
|
570
561
|
disposableStore.add(addDisposableListener(this._toolbar.getElement(), EventType.KEY_DOWN, (e) => {
|
|
571
562
|
const keyboardEvent = ( (new StandardKeyboardEvent(e)));
|
|
572
|
-
if (keyboardEvent.equals(
|
|
563
|
+
if (keyboardEvent.equals(9 )) {
|
|
573
564
|
hide(e);
|
|
574
565
|
}
|
|
575
566
|
}));
|
|
@@ -583,7 +574,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
583
574
|
return disposableStore;
|
|
584
575
|
}
|
|
585
576
|
_updateToolbar(providedActions, type) {
|
|
586
|
-
this._toolbar.setAriaLabel(type ===
|
|
577
|
+
this._toolbar.setAriaLabel(type === "help" ? ( localize(2273, 'Accessibility Help')) : ( localize(2274, "Accessible View")));
|
|
587
578
|
const menuActions = [];
|
|
588
579
|
const toolbarMenu = this._register(this._menuService.createMenu(MenuId.AccessibleView, this._contextKeyService));
|
|
589
580
|
createAndFillInActionBarActions(toolbarMenu, {}, menuActions);
|
|
@@ -602,7 +593,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
602
593
|
const dimension = this._layoutService.activeContainerDimension;
|
|
603
594
|
const maxHeight = dimension.height && dimension.height * .4;
|
|
604
595
|
const height = Math.min(maxHeight, this._editorWidget.getContentHeight());
|
|
605
|
-
const width = Math.min(dimension.width * 0.62 ,
|
|
596
|
+
const width = Math.min(dimension.width * 0.62 , 600 );
|
|
606
597
|
this._editorWidget.layout({ width, height });
|
|
607
598
|
}
|
|
608
599
|
async _getTextModel(resource) {
|
|
@@ -616,7 +607,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
616
607
|
if (!this._currentProvider) {
|
|
617
608
|
return false;
|
|
618
609
|
}
|
|
619
|
-
return this._currentProvider.options.type ===
|
|
610
|
+
return this._currentProvider.options.type === "help" || this._currentProvider.options.language === 'markdown' || this._currentProvider.options.language === undefined || (this._currentProvider instanceof AccessibleContentProvider && !!this._currentProvider.getSymbols?.());
|
|
620
611
|
}
|
|
621
612
|
_updateLastProvider() {
|
|
622
613
|
const provider = this._currentProvider;
|
|
@@ -658,7 +649,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
658
649
|
if (lastProvider instanceof AccessibleContentProvider) {
|
|
659
650
|
accessibleViewHelpProvider = ( (new AccessibleContentProvider(
|
|
660
651
|
lastProvider.id,
|
|
661
|
-
{ type:
|
|
652
|
+
{ type: "help" },
|
|
662
653
|
() => lastProvider.options.customHelp ? lastProvider?.options.customHelp() : this._accessibleViewHelpDialogContent(this._goToSymbolsSupported()),
|
|
663
654
|
() => {
|
|
664
655
|
this._contextViewService.hideContextView();
|
|
@@ -670,7 +661,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
670
661
|
else {
|
|
671
662
|
accessibleViewHelpProvider = ( (new ExtensionContentProvider(
|
|
672
663
|
lastProvider.id,
|
|
673
|
-
{ type:
|
|
664
|
+
{ type: "help" },
|
|
674
665
|
() => lastProvider.options.customHelp ? lastProvider?.options.customHelp() : this._accessibleViewHelpDialogContent(this._goToSymbolsSupported()),
|
|
675
666
|
() => {
|
|
676
667
|
this._contextViewService.hideContextView();
|
|
@@ -686,9 +677,9 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
686
677
|
_accessibleViewHelpDialogContent(providerHasSymbols) {
|
|
687
678
|
const navigationHint = this._navigationHint();
|
|
688
679
|
const goToSymbolHint = this._goToSymbolHint(providerHasSymbols);
|
|
689
|
-
const toolbarHint = ( localize(
|
|
680
|
+
const toolbarHint = ( localize(2275, "Navigate to the toolbar (Shift+Tab)."));
|
|
690
681
|
const chatHints = this._getChatHints();
|
|
691
|
-
let hint = ( localize(
|
|
682
|
+
let hint = ( localize(2276, "In the accessible view, you can:\n"));
|
|
692
683
|
if (navigationHint) {
|
|
693
684
|
hint += ' - ' + navigationHint + '\n';
|
|
694
685
|
}
|
|
@@ -704,39 +695,39 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
704
695
|
return hint;
|
|
705
696
|
}
|
|
706
697
|
_getChatHints() {
|
|
707
|
-
if (this._currentProvider?.id !==
|
|
698
|
+
if (this._currentProvider?.id !== "panelChat" ) {
|
|
708
699
|
return;
|
|
709
700
|
}
|
|
710
701
|
return [( localize(
|
|
711
|
-
|
|
702
|
+
2277,
|
|
712
703
|
" - Insert the code block at the cursor{0}.",
|
|
713
704
|
'<keybinding:workbench.action.chat.insertCodeBlock>'
|
|
714
705
|
)),
|
|
715
706
|
( localize(
|
|
716
|
-
|
|
707
|
+
2278,
|
|
717
708
|
" - Insert the code block into a new file{0}.",
|
|
718
709
|
'<keybinding:workbench.action.chat.insertIntoNewFile>'
|
|
719
710
|
)),
|
|
720
711
|
( localize(
|
|
721
|
-
|
|
712
|
+
2279,
|
|
722
713
|
" - Run the code block in the terminal{0}.\n",
|
|
723
714
|
'<keybinding:workbench.action.chat.runInTerminal>'
|
|
724
715
|
))].join('\n');
|
|
725
716
|
}
|
|
726
717
|
_navigationHint() {
|
|
727
718
|
return ( localize(
|
|
728
|
-
|
|
719
|
+
2280,
|
|
729
720
|
"Show the next item{0} or previous item{1}.",
|
|
730
|
-
`<keybinding:${
|
|
731
|
-
`<keybinding:${
|
|
721
|
+
`<keybinding:${"editor.action.accessibleViewNext" }`,
|
|
722
|
+
`<keybinding:${"editor.action.accessibleViewPrevious" }>`
|
|
732
723
|
));
|
|
733
724
|
}
|
|
734
725
|
_disableVerbosityHint(provider) {
|
|
735
|
-
if (provider.options.type ===
|
|
726
|
+
if (provider.options.type === "help" && this._verbosityEnabled()) {
|
|
736
727
|
return ( localize(
|
|
737
|
-
|
|
728
|
+
2281,
|
|
738
729
|
"\nDisable accessibility verbosity for this feature{0}.",
|
|
739
|
-
`<keybinding:${
|
|
730
|
+
`<keybinding:${"editor.action.accessibleViewDisableHint" }>`
|
|
740
731
|
));
|
|
741
732
|
}
|
|
742
733
|
return '';
|
|
@@ -746,25 +737,25 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
746
737
|
return;
|
|
747
738
|
}
|
|
748
739
|
return ( localize(
|
|
749
|
-
|
|
740
|
+
2282,
|
|
750
741
|
'Go to a symbol{0}.',
|
|
751
|
-
`<keybinding:${
|
|
742
|
+
`<keybinding:${"editor.action.accessibleViewGoToSymbol" }>`
|
|
752
743
|
));
|
|
753
744
|
}
|
|
754
745
|
_configureUnassignedKbHint() {
|
|
755
|
-
const configureKb = this._keybindingService.lookupKeybinding(
|
|
746
|
+
const configureKb = this._keybindingService.lookupKeybinding("editor.action.accessibilityHelpConfigureKeybindings" )?.getAriaLabel();
|
|
756
747
|
const keybindingToConfigureQuickPick = configureKb ? '(' + configureKb + ')' : 'by assigning a keybinding to the command Accessibility Help Configure Unassigned Keybindings.';
|
|
757
748
|
return ( localize(
|
|
758
|
-
|
|
749
|
+
2283,
|
|
759
750
|
'\nConfigure keybindings for commands that lack them {0}.',
|
|
760
751
|
keybindingToConfigureQuickPick
|
|
761
752
|
));
|
|
762
753
|
}
|
|
763
754
|
_configureAssignedKbHint() {
|
|
764
|
-
const configureKb = this._keybindingService.lookupKeybinding(
|
|
755
|
+
const configureKb = this._keybindingService.lookupKeybinding("editor.action.accessibilityHelpConfigureAssignedKeybindings" )?.getAriaLabel();
|
|
765
756
|
const keybindingToConfigureQuickPick = configureKb ? '(' + configureKb + ')' : 'by assigning a keybinding to the command Accessibility Help Configure Assigned Keybindings.';
|
|
766
757
|
return ( localize(
|
|
767
|
-
|
|
758
|
+
2284,
|
|
768
759
|
'\nConfigure keybindings for commands that already have assignments {0}.',
|
|
769
760
|
keybindingToConfigureQuickPick
|
|
770
761
|
));
|
|
@@ -775,7 +766,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
775
766
|
const turnOnMessage = (isMacintosh
|
|
776
767
|
? AccessibilityHelpNLS.changeConfigToOnMac
|
|
777
768
|
: AccessibilityHelpNLS.changeConfigToOnWinLinux);
|
|
778
|
-
if (accessibilitySupport && provider.id ===
|
|
769
|
+
if (accessibilitySupport && provider.id === "editor" ) {
|
|
779
770
|
screenReaderModeHint = AccessibilityHelpNLS.auto_on;
|
|
780
771
|
screenReaderModeHint += '\n';
|
|
781
772
|
}
|
|
@@ -786,13 +777,13 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
786
777
|
return screenReaderModeHint;
|
|
787
778
|
}
|
|
788
779
|
_exitDialogHint(provider) {
|
|
789
|
-
return this._verbosityEnabled() && !provider.options.position ? ( localize(
|
|
780
|
+
return this._verbosityEnabled() && !provider.options.position ? ( localize(2285, '\nExit this dialog (Escape).')) : '';
|
|
790
781
|
}
|
|
791
782
|
_readMoreHint(provider) {
|
|
792
783
|
return provider.options.readMoreUrl ? ( localize(
|
|
793
|
-
|
|
784
|
+
2286,
|
|
794
785
|
"\nOpen a browser window with more information related to accessibility{0}.",
|
|
795
|
-
`<keybinding:${
|
|
786
|
+
`<keybinding:${"editor.action.accessibilityHelpOpenHelpLink" }>`
|
|
796
787
|
)) : '';
|
|
797
788
|
}
|
|
798
789
|
};
|
|
@@ -847,14 +838,14 @@ let AccessibleViewService = class AccessibleViewService extends Disposable {
|
|
|
847
838
|
if (!this._configurationService.getValue(verbositySettingKey)) {
|
|
848
839
|
return null;
|
|
849
840
|
}
|
|
850
|
-
const keybinding = this._keybindingService.lookupKeybinding(
|
|
841
|
+
const keybinding = this._keybindingService.lookupKeybinding("editor.action.accessibleView" )?.getAriaLabel();
|
|
851
842
|
let hint = null;
|
|
852
843
|
if (keybinding) {
|
|
853
|
-
hint = ( localize(
|
|
844
|
+
hint = ( localize(2287, "Inspect this in the accessible view with {0}", keybinding));
|
|
854
845
|
}
|
|
855
846
|
else {
|
|
856
847
|
hint = ( localize(
|
|
857
|
-
|
|
848
|
+
2288,
|
|
858
849
|
"Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."
|
|
859
850
|
));
|
|
860
851
|
}
|
|
@@ -896,8 +887,8 @@ let AccessibleViewSymbolQuickPick = class AccessibleViewSymbolQuickPick {
|
|
|
896
887
|
show(provider) {
|
|
897
888
|
const disposables = ( (new DisposableStore()));
|
|
898
889
|
const quickPick = disposables.add(this._quickInputService.createQuickPick());
|
|
899
|
-
quickPick.placeholder = ( localize(
|
|
900
|
-
quickPick.title = ( localize(
|
|
890
|
+
quickPick.placeholder = ( localize(2289, "Type to search symbols"));
|
|
891
|
+
quickPick.title = ( localize(2290, "Go to Symbol Accessible View"));
|
|
901
892
|
const symbols = this._accessibleView.getSymbols();
|
|
902
893
|
if (!symbols) {
|
|
903
894
|
return;
|
|
@@ -923,12 +914,12 @@ AccessibleViewSymbolQuickPick = ( (__decorate([
|
|
|
923
914
|
( (__param(1, IQuickInputService)))
|
|
924
915
|
], AccessibleViewSymbolQuickPick)));
|
|
925
916
|
function shouldHide(event, keybindingService, configurationService) {
|
|
926
|
-
if (!configurationService.getValue(
|
|
917
|
+
if (!configurationService.getValue("accessibility.accessibleView.closeOnKeyPress" )) {
|
|
927
918
|
return false;
|
|
928
919
|
}
|
|
929
920
|
const standardKeyboardEvent = ( (new StandardKeyboardEvent(event)));
|
|
930
921
|
const resolveResult = keybindingService.softDispatch(standardKeyboardEvent, standardKeyboardEvent.target);
|
|
931
|
-
const isValidChord = resolveResult.kind ===
|
|
922
|
+
const isValidChord = resolveResult.kind === 1 ;
|
|
932
923
|
if (keybindingService.inChordMode || isValidChord) {
|
|
933
924
|
return false;
|
|
934
925
|
}
|
package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewContributions.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
2
2
|
import { accessibleViewIsShown } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
3
3
|
import { AccessibilityHelpAction, AccessibleViewAction } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibleViewActions';
|
|
4
|
-
import { AccessibleViewType } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleView';
|
|
5
4
|
import { IAccessibleViewService } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleView.service';
|
|
6
5
|
import { AccessibleViewRegistry } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleViewRegistry';
|
|
7
6
|
|
|
@@ -32,7 +31,7 @@ class AccesibleViewContributions extends Disposable {
|
|
|
32
31
|
return false;
|
|
33
32
|
}
|
|
34
33
|
};
|
|
35
|
-
if (impl.type ===
|
|
34
|
+
if (impl.type === "view" ) {
|
|
36
35
|
this._register(AccessibleViewAction.addImplementation(impl.priority, impl.name, implementation, impl.when));
|
|
37
36
|
}
|
|
38
37
|
else {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { Disposable, DisposableMap, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
|
-
import {
|
|
3
|
+
import { ExtensionContentProvider } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleView';
|
|
4
4
|
import { AccessibleViewRegistry } from 'vscode/vscode/vs/platform/accessibility/browser/accessibleViewRegistry';
|
|
5
5
|
import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
6
6
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
@@ -43,13 +43,13 @@ function registerAccessibilityHelpAction(keybindingService, viewDescriptor) {
|
|
|
43
43
|
disposableStore.add(AccessibleViewRegistry.register({
|
|
44
44
|
priority: 95,
|
|
45
45
|
name: viewDescriptor.id,
|
|
46
|
-
type:
|
|
46
|
+
type: "help" ,
|
|
47
47
|
when: ( FocusedViewContext.isEqualTo(viewDescriptor.id)),
|
|
48
48
|
getProvider: (accessor) => {
|
|
49
49
|
const viewsService = accessor.get(IViewsService);
|
|
50
50
|
return ( new ExtensionContentProvider(
|
|
51
51
|
viewDescriptor.id,
|
|
52
|
-
{ type:
|
|
52
|
+
{ type: "help" },
|
|
53
53
|
() => content,
|
|
54
54
|
() => viewsService.openView(viewDescriptor.id, true)
|
|
55
55
|
));
|
package/vscode/src/vs/workbench/contrib/accessibility/browser/unfocusedViewDimmingContribution.js
CHANGED
|
@@ -4,7 +4,6 @@ import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
|
4
4
|
import { Disposable, toDisposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
5
|
import { clamp } from 'vscode/vscode/vs/base/common/numbers';
|
|
6
6
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
7
|
-
import { AccessibilityWorkbenchSettingId, ViewDimUnfocusedOpacityProperties } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
8
7
|
|
|
9
8
|
let UnfocusedViewDimmingContribution = class UnfocusedViewDimmingContribution extends Disposable {
|
|
10
9
|
constructor(configurationService) {
|
|
@@ -12,13 +11,13 @@ let UnfocusedViewDimmingContribution = class UnfocusedViewDimmingContribution ex
|
|
|
12
11
|
this._styleElementDisposables = undefined;
|
|
13
12
|
this._register(toDisposable(() => this._removeStyleElement()));
|
|
14
13
|
this._register(Event.runAndSubscribe(configurationService.onDidChangeConfiguration, e => {
|
|
15
|
-
if (e && !e.affectsConfiguration(
|
|
14
|
+
if (e && !e.affectsConfiguration("accessibility.dimUnfocused.enabled" ) && !e.affectsConfiguration("accessibility.dimUnfocused.opacity" )) {
|
|
16
15
|
return;
|
|
17
16
|
}
|
|
18
17
|
let cssTextContent = '';
|
|
19
|
-
const enabled = ensureBoolean(configurationService.getValue(
|
|
18
|
+
const enabled = ensureBoolean(configurationService.getValue("accessibility.dimUnfocused.enabled" ), false);
|
|
20
19
|
if (enabled) {
|
|
21
|
-
const opacity = clamp(ensureNumber(configurationService.getValue(
|
|
20
|
+
const opacity = clamp(ensureNumber(configurationService.getValue("accessibility.dimUnfocused.opacity" ), 0.75 ), 0.2 , 1 );
|
|
22
21
|
if (opacity !== 1) {
|
|
23
22
|
const rules = ( new Set());
|
|
24
23
|
const filterRule = `filter: opacity(${opacity});`;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import 'vscode/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService';
|
|
2
2
|
import 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
3
3
|
import { registerAction2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
4
|
-
import 'vscode/vscode/vs/
|
|
5
|
-
import { registerWorkbenchContribution2, WorkbenchPhase } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
4
|
+
import { registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
6
5
|
import { AccessibilitySignalLineDebuggerContribution } from './accessibilitySignalDebuggerContribution.js';
|
|
7
6
|
import { ShowSignalSoundHelp, ShowAccessibilityAnnouncementHelp } from './commands.js';
|
|
8
7
|
import { EditorTextPropertySignalsContribution } from './editorTextPropertySignalsContribution.js';
|
|
9
8
|
import { wrapInReloadableClass0 } from 'vscode/vscode/vs/platform/observable/common/wrapInReloadableClass';
|
|
10
9
|
|
|
11
|
-
registerWorkbenchContribution2('EditorTextPropertySignalsContribution', wrapInReloadableClass0(() => EditorTextPropertySignalsContribution),
|
|
12
|
-
registerWorkbenchContribution2('AccessibilitySignalLineDebuggerContribution', AccessibilitySignalLineDebuggerContribution,
|
|
10
|
+
registerWorkbenchContribution2('EditorTextPropertySignalsContribution', wrapInReloadableClass0(() => EditorTextPropertySignalsContribution), 3 );
|
|
11
|
+
registerWorkbenchContribution2('AccessibilitySignalLineDebuggerContribution', AccessibilitySignalLineDebuggerContribution, 3 );
|
|
13
12
|
registerAction2(ShowSignalSoundHelp);
|
|
14
13
|
registerAction2(ShowAccessibilityAnnouncementHelp);
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { Disposable, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
3
|
import 'vscode/vscode/vs/base/common/arrays';
|
|
4
|
-
import 'vscode/vscode/vs/base/common/
|
|
4
|
+
import 'vscode/vscode/vs/base/common/event';
|
|
5
5
|
import { autorunWithStore } from 'vscode/vscode/vs/base/common/observableInternal/autorun';
|
|
6
|
-
import
|
|
6
|
+
import 'vscode/vscode/vs/base/common/observableInternal/derived';
|
|
7
7
|
import 'vscode/vscode/vs/base/common/cancellation';
|
|
8
|
+
import { observableFromEvent } from 'vscode/vscode/vs/base/common/observableInternal/utils';
|
|
8
9
|
import { AccessibilitySignal } from 'vscode/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService';
|
|
9
10
|
import { IAccessibilitySignalService } from 'vscode/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService.service';
|
|
10
11
|
import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug.service';
|
|
@@ -15,11 +15,11 @@ class ShowSignalSoundHelp extends Action2 {
|
|
|
15
15
|
constructor() {
|
|
16
16
|
super({
|
|
17
17
|
id: ShowSignalSoundHelp.ID,
|
|
18
|
-
title: ( localize2(
|
|
18
|
+
title: ( localize2(5586, "Help: List Signal Sounds")),
|
|
19
19
|
f1: true,
|
|
20
20
|
metadata: {
|
|
21
21
|
description: ( localize(
|
|
22
|
-
|
|
22
|
+
5587,
|
|
23
23
|
"List all accessibility sounds, noises, or audio cues and configure their settings"
|
|
24
24
|
))
|
|
25
25
|
}
|
|
@@ -37,7 +37,7 @@ class ShowSignalSoundHelp extends Action2 {
|
|
|
37
37
|
signal,
|
|
38
38
|
buttons: userGestureSignals.includes(signal) ? [{
|
|
39
39
|
iconClass: ThemeIcon.asClassName(Codicon.settingsGear),
|
|
40
|
-
tooltip: ( localize(
|
|
40
|
+
tooltip: ( localize(5588, 'Configure Sound')),
|
|
41
41
|
alwaysVisible: true
|
|
42
42
|
}] : []
|
|
43
43
|
})))).sort((a, b) => a.label.localeCompare(b.label));
|
|
@@ -73,7 +73,7 @@ class ShowSignalSoundHelp extends Action2 {
|
|
|
73
73
|
accessibilitySignalService.playSound(qp.activeItems[0].signal.sound.getSound(true), true, AcknowledgeDocCommentsToken);
|
|
74
74
|
}));
|
|
75
75
|
disposables.add(qp.onDidHide(() => disposables.dispose()));
|
|
76
|
-
qp.placeholder = ( localize(
|
|
76
|
+
qp.placeholder = ( localize(5589, 'Select a sound to play and configure'));
|
|
77
77
|
qp.canSelectMany = true;
|
|
78
78
|
await qp.show();
|
|
79
79
|
}
|
|
@@ -86,11 +86,11 @@ class ShowAccessibilityAnnouncementHelp extends Action2 {
|
|
|
86
86
|
constructor() {
|
|
87
87
|
super({
|
|
88
88
|
id: ShowAccessibilityAnnouncementHelp.ID,
|
|
89
|
-
title: ( localize2(
|
|
89
|
+
title: ( localize2(5590, "Help: List Signal Announcements")),
|
|
90
90
|
f1: true,
|
|
91
91
|
metadata: {
|
|
92
92
|
description: ( localize(
|
|
93
|
-
|
|
93
|
+
5591,
|
|
94
94
|
"List all accessibility announcements, alerts, braille messages, and configure their settings"
|
|
95
95
|
))
|
|
96
96
|
}
|
|
@@ -108,7 +108,7 @@ class ShowAccessibilityAnnouncementHelp extends Action2 {
|
|
|
108
108
|
signal,
|
|
109
109
|
buttons: userGestureSignals.includes(signal) ? [{
|
|
110
110
|
iconClass: ThemeIcon.asClassName(Codicon.settingsGear),
|
|
111
|
-
tooltip: ( localize(
|
|
111
|
+
tooltip: ( localize(5592, 'Configure Announcement')),
|
|
112
112
|
alwaysVisible: true,
|
|
113
113
|
}] : []
|
|
114
114
|
})))).sort((a, b) => a.label.localeCompare(b.label));
|
|
@@ -141,8 +141,8 @@ class ShowAccessibilityAnnouncementHelp extends Action2 {
|
|
|
141
141
|
preferencesService.openUserSettings({ jsonEditor: true, revealSetting: { key: e.item.signal.settingsKey, edit: true } });
|
|
142
142
|
}));
|
|
143
143
|
disposables.add(qp.onDidHide(() => disposables.dispose()));
|
|
144
|
-
qp.placeholder = screenReaderOptimized ? ( localize(
|
|
145
|
-
|
|
144
|
+
qp.placeholder = screenReaderOptimized ? ( localize(5593, 'Select an announcement to configure')) : ( localize(
|
|
145
|
+
5594,
|
|
146
146
|
'Screen reader is not active, announcements are disabled by default.'
|
|
147
147
|
));
|
|
148
148
|
qp.canSelectMany = true;
|
|
@@ -2,21 +2,21 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
|
2
2
|
import { disposableTimeout } from 'vscode/vscode/vs/base/common/async';
|
|
3
3
|
import { Disposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
4
|
import 'vscode/vscode/vs/base/common/arrays';
|
|
5
|
-
import
|
|
5
|
+
import 'vscode/vscode/vs/base/common/event';
|
|
6
6
|
import { autorunWithStore, autorun } from 'vscode/vscode/vs/base/common/observableInternal/autorun';
|
|
7
|
-
import {
|
|
7
|
+
import { derived } from 'vscode/vscode/vs/base/common/observableInternal/derived';
|
|
8
8
|
import 'vscode/vscode/vs/base/common/cancellation';
|
|
9
|
+
import { observableFromValueWithChangeEvent, observableFromEvent, wasEventTriggeredRecently, observableSignalFromEvent, observableFromPromise } from 'vscode/vscode/vs/base/common/observableInternal/utils';
|
|
9
10
|
import { isDefined } from 'vscode/vscode/vs/base/common/types';
|
|
10
11
|
import { isDiffEditor, isCodeEditor } from 'vscode/vscode/vs/editor/browser/editorBrowser';
|
|
11
|
-
import { CursorChangeReason } from 'vscode/vscode/vs/editor/common/cursorEvents';
|
|
12
12
|
import { FoldingController } from 'vscode/vscode/vs/editor/contrib/folding/browser/folding';
|
|
13
13
|
import { AccessibilitySignal } from 'vscode/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService';
|
|
14
14
|
import { IAccessibilitySignalService } from 'vscode/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService.service';
|
|
15
15
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
16
16
|
import { MarkerSeverity } from 'vscode/vscode/vs/platform/markers/common/markers';
|
|
17
17
|
import { IMarkerService } from 'vscode/vscode/vs/platform/markers/common/markers.service';
|
|
18
|
-
import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug.service';
|
|
19
18
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
19
|
+
import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug.service';
|
|
20
20
|
|
|
21
21
|
let EditorTextPropertySignalsContribution = class EditorTextPropertySignalsContribution extends Disposable {
|
|
22
22
|
constructor(_editorService, _instantiationService, _accessibilitySignalService) {
|
|
@@ -64,8 +64,8 @@ let EditorTextPropertySignalsContribution = class EditorTextPropertySignalsContr
|
|
|
64
64
|
store.add(editor.onDidChangeCursorPosition(args => {
|
|
65
65
|
timeouts.clear();
|
|
66
66
|
if (args &&
|
|
67
|
-
args.reason !==
|
|
68
|
-
args.reason !==
|
|
67
|
+
args.reason !== 3 &&
|
|
68
|
+
args.reason !== 0 ) {
|
|
69
69
|
ignoredLineSignalsForCurrentLine.clear();
|
|
70
70
|
return;
|
|
71
71
|
}
|
package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/openDiffEditorAnnouncement.js
CHANGED
|
@@ -6,7 +6,6 @@ import { IAccessibilityService } from 'vscode/vscode/vs/platform/accessibility/c
|
|
|
6
6
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
7
7
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
8
8
|
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
9
|
-
import { AccessibilityVerbositySettingId } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
10
9
|
|
|
11
10
|
let DiffEditorActiveAnnouncementContribution = class DiffEditorActiveAnnouncementContribution extends Disposable {
|
|
12
11
|
static { this.ID = 'workbench.contrib.diffEditorActiveAnnouncement'; }
|
|
@@ -17,13 +16,13 @@ let DiffEditorActiveAnnouncementContribution = class DiffEditorActiveAnnouncemen
|
|
|
17
16
|
this._configurationService = _configurationService;
|
|
18
17
|
this._register(Event.runAndSubscribe(_accessibilityService.onDidChangeScreenReaderOptimized, () => this._updateListener()));
|
|
19
18
|
this._register(_configurationService.onDidChangeConfiguration(e => {
|
|
20
|
-
if (e.affectsConfiguration(
|
|
19
|
+
if (e.affectsConfiguration("accessibility.verbosity.diffEditorActive" )) {
|
|
21
20
|
this._updateListener();
|
|
22
21
|
}
|
|
23
22
|
}));
|
|
24
23
|
}
|
|
25
24
|
_updateListener() {
|
|
26
|
-
const announcementEnabled = this._configurationService.getValue(
|
|
25
|
+
const announcementEnabled = this._configurationService.getValue("accessibility.verbosity.diffEditorActive" );
|
|
27
26
|
const screenReaderOptimized = this._accessibilityService.isScreenReaderOptimized();
|
|
28
27
|
if (!announcementEnabled || !screenReaderOptimized) {
|
|
29
28
|
this._onDidActiveEditorChangeListener?.dispose();
|
|
@@ -35,7 +34,7 @@ let DiffEditorActiveAnnouncementContribution = class DiffEditorActiveAnnouncemen
|
|
|
35
34
|
}
|
|
36
35
|
this._onDidActiveEditorChangeListener = this._register(this._editorService.onDidActiveEditorChange(() => {
|
|
37
36
|
if (isDiffEditor(this._editorService.activeTextEditorControl)) {
|
|
38
|
-
this._accessibilityService.alert(( localize(
|
|
37
|
+
this._accessibilityService.alert(( localize(5585, "Diff editor")));
|
|
39
38
|
}
|
|
40
39
|
}));
|
|
41
40
|
}
|
package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/saveAccessibilitySignal.js
CHANGED
|
@@ -2,7 +2,6 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
|
2
2
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
3
|
import { AccessibilitySignal } from 'vscode/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService';
|
|
4
4
|
import { IAccessibilitySignalService } from 'vscode/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService.service';
|
|
5
|
-
import { SaveReason } from 'vscode/vscode/vs/workbench/common/editor';
|
|
6
5
|
import { IWorkingCopyService } from 'vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyService.service';
|
|
7
6
|
|
|
8
7
|
let SaveAccessibilitySignalContribution = class SaveAccessibilitySignalContribution extends Disposable {
|
|
@@ -11,7 +10,7 @@ let SaveAccessibilitySignalContribution = class SaveAccessibilitySignalContribut
|
|
|
11
10
|
super();
|
|
12
11
|
this._accessibilitySignalService = _accessibilitySignalService;
|
|
13
12
|
this._workingCopyService = _workingCopyService;
|
|
14
|
-
this._register(this._workingCopyService.onDidSave(e => this._accessibilitySignalService.playSignal(AccessibilitySignal.save, { userGesture: e.reason ===
|
|
13
|
+
this._register(this._workingCopyService.onDidSave(e => this._accessibilitySignalService.playSignal(AccessibilitySignal.save, { userGesture: e.reason === 1 })));
|
|
15
14
|
}
|
|
16
15
|
};
|
|
17
16
|
SaveAccessibilitySignalContribution = ( __decorate([
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import './accessibility.css.js';
|
|
2
2
|
import { localize2 } from 'vscode/vscode/vs/nls';
|
|
3
|
-
import { ConfigurationTarget } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
4
3
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
5
4
|
import { IAccessibilityService } from 'vscode/vscode/vs/platform/accessibility/common/accessibility.service';
|
|
6
5
|
import { Action2, registerAction2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
7
6
|
import { accessibilityHelpIsShown } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
8
|
-
import { KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
9
|
-
import { KeyMod, KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
10
7
|
import { alert } from 'vscode/vscode/vs/base/browser/ui/aria/aria';
|
|
11
8
|
import { AccessibilityHelpNLS } from 'vscode/vscode/vs/editor/common/standaloneStrings';
|
|
12
9
|
|
|
@@ -14,23 +11,23 @@ class ToggleScreenReaderMode extends Action2 {
|
|
|
14
11
|
constructor() {
|
|
15
12
|
super({
|
|
16
13
|
id: 'editor.action.toggleScreenReaderAccessibilityMode',
|
|
17
|
-
title: ( localize2(
|
|
14
|
+
title: ( localize2(2340, "Toggle Screen Reader Accessibility Mode")),
|
|
18
15
|
metadata: {
|
|
19
16
|
description: ( localize2(
|
|
20
|
-
|
|
17
|
+
2341,
|
|
21
18
|
"Toggles an optimized mode for usage with screen readers, braille devices, and other assistive technologies."
|
|
22
19
|
)),
|
|
23
20
|
},
|
|
24
21
|
f1: true,
|
|
25
22
|
keybinding: [{
|
|
26
|
-
primary:
|
|
27
|
-
weight:
|
|
23
|
+
primary: 2048 | 35 ,
|
|
24
|
+
weight: 200 + 10,
|
|
28
25
|
when: accessibilityHelpIsShown
|
|
29
26
|
},
|
|
30
27
|
{
|
|
31
|
-
primary:
|
|
32
|
-
linux: { primary:
|
|
33
|
-
weight:
|
|
28
|
+
primary: 512 | 59 | 1024 ,
|
|
29
|
+
linux: { primary: 512 | 62 | 1024 },
|
|
30
|
+
weight: 200 + 10,
|
|
34
31
|
}]
|
|
35
32
|
});
|
|
36
33
|
}
|
|
@@ -38,7 +35,7 @@ class ToggleScreenReaderMode extends Action2 {
|
|
|
38
35
|
const accessibiiltyService = accessor.get(IAccessibilityService);
|
|
39
36
|
const configurationService = accessor.get(IConfigurationService);
|
|
40
37
|
const isScreenReaderOptimized = accessibiiltyService.isScreenReaderOptimized();
|
|
41
|
-
configurationService.updateValue('editor.accessibilitySupport', isScreenReaderOptimized ? 'off' : 'on',
|
|
38
|
+
configurationService.updateValue('editor.accessibilitySupport', isScreenReaderOptimized ? 'off' : 'on', 2 );
|
|
42
39
|
alert(isScreenReaderOptimized ? AccessibilityHelpNLS.screenReaderModeDisabled : AccessibilityHelpNLS.screenReaderModeEnabled);
|
|
43
40
|
}
|
|
44
41
|
}
|
package/vscode/src/vs/workbench/services/accessibility/common/accessibleViewInformationService.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
3
|
import { ACCESSIBLE_VIEW_SHOWN_STORAGE_PREFIX } from 'vscode/vscode/vs/platform/accessibility/common/accessibility';
|
|
4
|
-
import { StorageScope } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
5
4
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
6
5
|
|
|
7
6
|
let AccessibleViewInformationService = class AccessibleViewInformationService extends Disposable {
|
|
@@ -10,7 +9,7 @@ let AccessibleViewInformationService = class AccessibleViewInformationService ex
|
|
|
10
9
|
this._storageService = _storageService;
|
|
11
10
|
}
|
|
12
11
|
hasShownAccessibleView(viewId) {
|
|
13
|
-
return this._storageService.getBoolean(`${ACCESSIBLE_VIEW_SHOWN_STORAGE_PREFIX}${viewId}`,
|
|
12
|
+
return this._storageService.getBoolean(`${ACCESSIBLE_VIEW_SHOWN_STORAGE_PREFIX}${viewId}`, -1 , false) === true;
|
|
14
13
|
}
|
|
15
14
|
};
|
|
16
15
|
AccessibleViewInformationService = ( __decorate([
|