@codingame/monaco-vscode-accessibility-service-override 16.1.1 → 17.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 +3 -3
- package/vscode/src/vs/platform/accessibilitySignal/browser/media/all.mp3.js +2 -0
- package/vscode/src/vs/platform/accessibilitySignal/browser/media/nextEditSuggestion.mp3 +0 -0
- package/vscode/src/vs/platform/accessibilitySignal/browser/media/save.mp3 +0 -0
- package/vscode/src/vs/platform/accessibilitySignal/browser/media/terminalCommandSucceeded.mp3 +0 -0
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityStatus.js +6 -6
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.d.ts +9 -6
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.js +56 -38
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewKeybindingResolver.d.ts +1 -1
- 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 +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-accessibility-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - accessibility service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-
|
|
19
|
-
"@codingame/monaco-vscode-
|
|
18
|
+
"@codingame/monaco-vscode-api": "17.0.0",
|
|
19
|
+
"@codingame/monaco-vscode-b4efa70b-52b9-5670-ab5c-f10b10b6834e-common": "17.0.0",
|
|
20
20
|
"marked": "14.0.0"
|
|
21
21
|
},
|
|
22
22
|
"main": "index.js",
|
|
@@ -10,6 +10,7 @@ var audioAssets = {
|
|
|
10
10
|
'vs/platform/accessibilitySignal/browser/media/error.mp3': new URL('./error.mp3', import.meta.url).href,
|
|
11
11
|
'vs/platform/accessibilitySignal/browser/media/foldedAreas.mp3': new URL('./foldedAreas.mp3', import.meta.url).href,
|
|
12
12
|
'vs/platform/accessibilitySignal/browser/media/format.mp3': new URL('./format.mp3', import.meta.url).href,
|
|
13
|
+
'vs/platform/accessibilitySignal/browser/media/nextEditSuggestion.mp3': new URL('./nextEditSuggestion.mp3', import.meta.url).href,
|
|
13
14
|
'vs/platform/accessibilitySignal/browser/media/progress.mp3': new URL('./progress.mp3', import.meta.url).href,
|
|
14
15
|
'vs/platform/accessibilitySignal/browser/media/quickFixes.mp3': new URL('./quickFixes.mp3', import.meta.url).href,
|
|
15
16
|
'vs/platform/accessibilitySignal/browser/media/requestSent.mp3': new URL('./requestSent.mp3', import.meta.url).href,
|
|
@@ -22,6 +23,7 @@ var audioAssets = {
|
|
|
22
23
|
'vs/platform/accessibilitySignal/browser/media/taskCompleted.mp3': new URL('./taskCompleted.mp3', import.meta.url).href,
|
|
23
24
|
'vs/platform/accessibilitySignal/browser/media/taskFailed.mp3': new URL('./taskFailed.mp3', import.meta.url).href,
|
|
24
25
|
'vs/platform/accessibilitySignal/browser/media/terminalBell.mp3': new URL('./terminalBell.mp3', import.meta.url).href,
|
|
26
|
+
'vs/platform/accessibilitySignal/browser/media/terminalCommandSucceeded.mp3': new URL('./terminalCommandSucceeded.mp3', import.meta.url).href,
|
|
25
27
|
'vs/platform/accessibilitySignal/browser/media/voiceRecordingStarted.mp3': new URL('./voiceRecordingStarted.mp3', import.meta.url).href,
|
|
26
28
|
'vs/platform/accessibilitySignal/browser/media/voiceRecordingStopped.mp3': new URL('./voiceRecordingStopped.mp3', import.meta.url).href,
|
|
27
29
|
'vs/platform/accessibilitySignal/browser/media/warning.mp3': new URL('./warning.mp3', import.meta.url).href
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -40,22 +40,22 @@ let AccessibilityStatus = class AccessibilityStatus extends Disposable {
|
|
|
40
40
|
}
|
|
41
41
|
showScreenReaderNotification() {
|
|
42
42
|
this.screenReaderNotification = this.notificationService.prompt(Severity.Info, ( localize(
|
|
43
|
-
|
|
43
|
+
4174,
|
|
44
44
|
"Screen reader usage detected. Do you want to enable {0} to optimize the editor for screen reader usage?",
|
|
45
45
|
'editor.accessibilitySupport'
|
|
46
46
|
)), [{
|
|
47
|
-
label: ( localize(
|
|
47
|
+
label: ( localize(4175, "Yes")),
|
|
48
48
|
run: () => {
|
|
49
49
|
this.configurationService.updateValue('editor.accessibilitySupport', 'on', ConfigurationTarget.USER);
|
|
50
50
|
}
|
|
51
51
|
}, {
|
|
52
|
-
label: ( localize(
|
|
52
|
+
label: ( localize(4176, "No")),
|
|
53
53
|
run: () => {
|
|
54
54
|
this.configurationService.updateValue('editor.accessibilitySupport', 'off', ConfigurationTarget.USER);
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
|
-
label: ( localize(
|
|
58
|
+
label: ( localize(4177, "Learn More")),
|
|
59
59
|
run: () => {
|
|
60
60
|
this.openerService.open('https://code.visualstudio.com/docs/editor/accessibility#_screen-readers');
|
|
61
61
|
}
|
|
@@ -68,9 +68,9 @@ let AccessibilityStatus = class AccessibilityStatus extends Disposable {
|
|
|
68
68
|
updateScreenReaderModeElement(visible) {
|
|
69
69
|
if (visible) {
|
|
70
70
|
if (!this.screenReaderModeElement.value) {
|
|
71
|
-
const text = ( localize(
|
|
71
|
+
const text = ( localize(4178, "Screen Reader Optimized"));
|
|
72
72
|
this.screenReaderModeElement.value = this.statusbarService.addEntry({
|
|
73
|
-
name: ( localize(
|
|
73
|
+
name: ( localize(4179, "Screen Reader Mode")),
|
|
74
74
|
text,
|
|
75
75
|
ariaLabel: text,
|
|
76
76
|
command: 'showEditorScreenReaderNotification',
|
|
@@ -4,9 +4,12 @@ import { CodeEditorWidget } from "@codingame/monaco-vscode-api/vscode/vs/editor/
|
|
|
4
4
|
import { IPosition, Position } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/position";
|
|
5
5
|
import { ITextModel } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/model";
|
|
6
6
|
import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service";
|
|
7
|
-
import {
|
|
7
|
+
import { ITextModelContentProvider } from "@codingame/monaco-vscode-model-service-override/vscode/vs/editor/common/services/resolverService";
|
|
8
|
+
import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service";
|
|
9
|
+
import { AccessibleContentProvider, AccessibleViewProviderId, ExtensionContentProvider, IAccessibleViewSymbol } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView";
|
|
8
10
|
import { IAccessibleViewService } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView.service";
|
|
9
11
|
import { IAccessibilityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility.service";
|
|
12
|
+
import { IAccessibilitySignalService } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService.service";
|
|
10
13
|
import { IMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service";
|
|
11
14
|
import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service";
|
|
12
15
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
@@ -18,11 +21,9 @@ import { ILayoutService } from "@codingame/monaco-vscode-api/vscode/vs/platform/
|
|
|
18
21
|
import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
|
|
19
22
|
import { IQuickInputService } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service";
|
|
20
23
|
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
21
|
-
import { AccessibilityVerbositySettingId } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration";
|
|
22
24
|
import { IChatCodeBlockContextProviderService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
23
|
-
import { ICodeBlockActionContext } from "@codingame/monaco-vscode-
|
|
24
|
-
import {
|
|
25
|
-
import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service";
|
|
25
|
+
import { ICodeBlockActionContext } from "@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common/vscode/vs/workbench/contrib/chat/browser/codeBlockPart";
|
|
26
|
+
import { AccessibilityVerbositySettingId } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration";
|
|
26
27
|
export type AccesibleViewContentProvider = AccessibleContentProvider | ExtensionContentProvider;
|
|
27
28
|
export declare class AccessibleView extends Disposable implements ITextModelContentProvider {
|
|
28
29
|
private readonly _openerService;
|
|
@@ -40,6 +41,7 @@ export declare class AccessibleView extends Disposable implements ITextModelCont
|
|
|
40
41
|
private readonly _storageService;
|
|
41
42
|
private readonly textModelResolverService;
|
|
42
43
|
private readonly _quickInputService;
|
|
44
|
+
private readonly _accessibilitySignalService;
|
|
43
45
|
private _editorWidget;
|
|
44
46
|
private _accessiblityHelpIsShown;
|
|
45
47
|
private _onLastLine;
|
|
@@ -62,7 +64,8 @@ export declare class AccessibleView extends Disposable implements ITextModelCont
|
|
|
62
64
|
private _currentContent;
|
|
63
65
|
private _lastProvider;
|
|
64
66
|
private _viewContainer;
|
|
65
|
-
constructor(_openerService: IOpenerService, _instantiationService: IInstantiationService, _configurationService: IConfigurationService, _modelService: IModelService, _contextViewService: IContextViewService, _contextKeyService: IContextKeyService, _accessibilityService: IAccessibilityService, _keybindingService: IKeybindingService, _layoutService: ILayoutService, _menuService: IMenuService, _commandService: ICommandService, _codeBlockContextProviderService: IChatCodeBlockContextProviderService, _storageService: IStorageService, textModelResolverService: ITextModelService, _quickInputService: IQuickInputService);
|
|
67
|
+
constructor(_openerService: IOpenerService, _instantiationService: IInstantiationService, _configurationService: IConfigurationService, _modelService: IModelService, _contextViewService: IContextViewService, _contextKeyService: IContextKeyService, _accessibilityService: IAccessibilityService, _keybindingService: IKeybindingService, _layoutService: ILayoutService, _menuService: IMenuService, _commandService: ICommandService, _codeBlockContextProviderService: IChatCodeBlockContextProviderService, _storageService: IStorageService, textModelResolverService: ITextModelService, _quickInputService: IQuickInputService, _accessibilitySignalService: IAccessibilitySignalService);
|
|
68
|
+
private _playDiffSignals;
|
|
66
69
|
provideTextContent(resource: URI): Promise<ITextModel | null> | null;
|
|
67
70
|
private _resetContextKeys;
|
|
68
71
|
getPosition(id?: AccessibleViewProviderId): Position | undefined;
|
|
@@ -8,6 +8,7 @@ import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codi
|
|
|
8
8
|
import { KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
|
|
9
9
|
import { Disposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
10
10
|
import { marked } from 'marked';
|
|
11
|
+
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
11
12
|
import { isWindows, isMacintosh } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
12
13
|
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
13
14
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
@@ -15,12 +16,15 @@ import { EditorExtensionsRegistry } from '@codingame/monaco-vscode-api/vscode/vs
|
|
|
15
16
|
import { CodeEditorWidget } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/widget/codeEditor/codeEditorWidget';
|
|
16
17
|
import { Position } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/position';
|
|
17
18
|
import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
|
|
19
|
+
import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service';
|
|
18
20
|
import { AccessibilityHelpNLS } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/standaloneStrings';
|
|
19
21
|
import { CodeActionController } from '@codingame/monaco-vscode-api/vscode/vs/editor/contrib/codeAction/browser/codeActionController';
|
|
20
22
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
21
23
|
import { isIAccessibleViewContentProvider, AccessibleContentProvider, AccessibleViewProviderId, ExtensionContentProvider, AccessibleViewType } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView';
|
|
22
24
|
import { ACCESSIBLE_VIEW_SHOWN_STORAGE_PREFIX } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility';
|
|
23
25
|
import { IAccessibilityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility.service';
|
|
26
|
+
import { AccessibilitySignal } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService';
|
|
27
|
+
import { IAccessibilitySignalService } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService.service';
|
|
24
28
|
import { getFlatActionBarActions } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
|
|
25
29
|
import { WorkbenchToolBar } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/toolbar';
|
|
26
30
|
import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
@@ -37,13 +41,12 @@ import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/
|
|
|
37
41
|
import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
38
42
|
import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
39
43
|
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
44
|
+
import { FloatingEditorClickMenu } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/codeeditor';
|
|
45
|
+
import { IChatCodeBlockContextProviderService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
46
|
+
import { getSimpleEditorOptions } from '@codingame/monaco-vscode-b4efa70b-52b9-5670-ab5c-f10b10b6834e-common/vscode/vs/workbench/contrib/codeEditor/browser/simpleEditorOptions';
|
|
47
|
+
import { AccessibilityCommandId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/common/accessibilityCommands';
|
|
40
48
|
import { accessibilityHelpIsShown, accessibleViewIsShown, accessibleViewSupportsNavigation, accessibleViewVerbosityEnabled, accessibleViewGoToSymbolSupported, accessibleViewCurrentProviderId, accessibleViewInCodeBlock, accessibleViewContainsCodeBlocks, accessibleViewOnLastLine, accessibleViewHasUnassignedKeybindings, accessibleViewHasAssignedKeybindings, AccessibilityWorkbenchSettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
41
49
|
import { resolveContentAndKeybindingItems } from './accessibleViewKeybindingResolver.js';
|
|
42
|
-
import { AccessibilityCommandId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/common/accessibilityCommands';
|
|
43
|
-
import { IChatCodeBlockContextProviderService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
|
|
44
|
-
import { getSimpleEditorOptions } from '@codingame/monaco-vscode-3e369455-cc41-54c6-86fb-8b7cd999a5da-common/vscode/vs/workbench/contrib/codeEditor/browser/simpleEditorOptions';
|
|
45
|
-
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
46
|
-
import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service';
|
|
47
50
|
|
|
48
51
|
var DIMENSIONS;
|
|
49
52
|
(function (DIMENSIONS) {
|
|
@@ -51,7 +54,7 @@ var DIMENSIONS;
|
|
|
51
54
|
})(DIMENSIONS || (DIMENSIONS = {}));
|
|
52
55
|
let AccessibleView = class AccessibleView extends Disposable {
|
|
53
56
|
get editorWidget() { return this._editorWidget; }
|
|
54
|
-
constructor(_openerService, _instantiationService, _configurationService, _modelService, _contextViewService, _contextKeyService, _accessibilityService, _keybindingService, _layoutService, _menuService, _commandService, _codeBlockContextProviderService, _storageService, textModelResolverService, _quickInputService) {
|
|
57
|
+
constructor(_openerService, _instantiationService, _configurationService, _modelService, _contextViewService, _contextKeyService, _accessibilityService, _keybindingService, _layoutService, _menuService, _commandService, _codeBlockContextProviderService, _storageService, textModelResolverService, _quickInputService, _accessibilitySignalService) {
|
|
55
58
|
super();
|
|
56
59
|
this._openerService = _openerService;
|
|
57
60
|
this._instantiationService = _instantiationService;
|
|
@@ -68,6 +71,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
68
71
|
this._storageService = _storageService;
|
|
69
72
|
this.textModelResolverService = textModelResolverService;
|
|
70
73
|
this._quickInputService = _quickInputService;
|
|
74
|
+
this._accessibilitySignalService = _accessibilitySignalService;
|
|
71
75
|
this._isInQuickPick = false;
|
|
72
76
|
this._accessiblityHelpIsShown = accessibilityHelpIsShown.bindTo(this._contextKeyService);
|
|
73
77
|
this._accessibleViewIsShown = accessibleViewIsShown.bindTo(this._contextKeyService);
|
|
@@ -86,7 +90,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
86
90
|
this._container.classList.add('hide');
|
|
87
91
|
}
|
|
88
92
|
const codeEditorWidgetOptions = {
|
|
89
|
-
contributions: EditorExtensionsRegistry.getEditorContributions().filter(c => c.id !== CodeActionController.ID)
|
|
93
|
+
contributions: EditorExtensionsRegistry.getEditorContributions().filter(c => c.id !== CodeActionController.ID && c.id !== FloatingEditorClickMenu.ID)
|
|
90
94
|
};
|
|
91
95
|
const titleBar = document.createElement('div');
|
|
92
96
|
titleBar.classList.add('accessible-view-title-bar');
|
|
@@ -138,15 +142,28 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
138
142
|
this._register(this._editorWidget.onDidDispose(() => this._resetContextKeys()));
|
|
139
143
|
this._register(this._editorWidget.onDidChangeCursorPosition(() => {
|
|
140
144
|
this._onLastLine.set(this._editorWidget.getPosition()?.lineNumber === this._editorWidget.getModel()?.getLineCount());
|
|
141
|
-
}));
|
|
142
|
-
this._register(this._editorWidget.onDidChangeCursorPosition(() => {
|
|
143
145
|
const cursorPosition = this._editorWidget.getPosition()?.lineNumber;
|
|
144
146
|
if (this._codeBlocks && cursorPosition !== undefined) {
|
|
145
147
|
const inCodeBlock = this._codeBlocks.find(c => c.startLine <= cursorPosition && c.endLine >= cursorPosition) !== undefined;
|
|
146
148
|
this._accessibleViewInCodeBlock.set(inCodeBlock);
|
|
147
149
|
}
|
|
150
|
+
this._playDiffSignals();
|
|
148
151
|
}));
|
|
149
152
|
}
|
|
153
|
+
_playDiffSignals() {
|
|
154
|
+
const position = this._editorWidget.getPosition();
|
|
155
|
+
const model = this._editorWidget.getModel();
|
|
156
|
+
if (!position || !model) {
|
|
157
|
+
return undefined;
|
|
158
|
+
}
|
|
159
|
+
const lineContent = model.getLineContent(position.lineNumber);
|
|
160
|
+
if (lineContent?.startsWith('+')) {
|
|
161
|
+
this._accessibilitySignalService.playSignal(AccessibilitySignal.diffLineInserted);
|
|
162
|
+
}
|
|
163
|
+
else if (lineContent?.startsWith('-')) {
|
|
164
|
+
this._accessibilitySignalService.playSignal(AccessibilitySignal.diffLineDeleted);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
150
167
|
provideTextContent(resource) {
|
|
151
168
|
return this._getTextModel(resource);
|
|
152
169
|
}
|
|
@@ -188,7 +205,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
188
205
|
if (!codeBlock || codeBlockIndex === undefined) {
|
|
189
206
|
return;
|
|
190
207
|
}
|
|
191
|
-
return { code: codeBlock.code, languageId: codeBlock.languageId, codeBlockIndex, element: undefined };
|
|
208
|
+
return { code: codeBlock.code, languageId: codeBlock.languageId, codeBlockIndex, element: undefined, chatSessionId: codeBlock.chatSessionId };
|
|
192
209
|
}
|
|
193
210
|
navigateToCodeBlock(type) {
|
|
194
211
|
const position = this._editorWidget.getPosition();
|
|
@@ -322,7 +339,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
322
339
|
inBlock = false;
|
|
323
340
|
const endLine = i;
|
|
324
341
|
const code = lines.slice(startLine, endLine).join('\n');
|
|
325
|
-
this._codeBlocks?.push({ startLine, endLine, code, languageId });
|
|
342
|
+
this._codeBlocks?.push({ startLine, endLine, code, languageId, chatSessionId: undefined });
|
|
326
343
|
}
|
|
327
344
|
});
|
|
328
345
|
this._accessibleViewContainsCodeBlocks.set(this._codeBlocks.length > 0);
|
|
@@ -362,8 +379,8 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
362
379
|
const disposables = this._register(( new DisposableStore()));
|
|
363
380
|
const quickPick = disposables.add(this._quickInputService.createQuickPick());
|
|
364
381
|
quickPick.items = items;
|
|
365
|
-
quickPick.title = ( localize(
|
|
366
|
-
quickPick.placeholder = ( localize(
|
|
382
|
+
quickPick.title = ( localize(4180, 'Configure keybindings'));
|
|
383
|
+
quickPick.placeholder = ( localize(4181, 'Select a command ID to configure a keybinding for it'));
|
|
367
384
|
quickPick.show();
|
|
368
385
|
disposables.add(quickPick.onDidAccept(async () => {
|
|
369
386
|
const item = quickPick.selectedItems[0];
|
|
@@ -403,7 +420,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
403
420
|
}
|
|
404
421
|
}
|
|
405
422
|
if (label) {
|
|
406
|
-
symbols.push({ markdownToParse: label, label: ( localize(
|
|
423
|
+
symbols.push({ markdownToParse: label, label: ( localize(4182, "({0}) {1}", token.type, label)), ariaLabel: ( localize(4183, "({0}) {1}", token.type, label)), firstListItem });
|
|
407
424
|
firstListItem = undefined;
|
|
408
425
|
}
|
|
409
426
|
}
|
|
@@ -436,7 +453,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
436
453
|
}
|
|
437
454
|
this._configurationService.updateValue(this._currentProvider?.verbositySettingKey, false);
|
|
438
455
|
alert(( localize(
|
|
439
|
-
|
|
456
|
+
4184,
|
|
440
457
|
'{0} accessibility verbosity is now disabled',
|
|
441
458
|
this._currentProvider.verbositySettingKey
|
|
442
459
|
)));
|
|
@@ -515,17 +532,17 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
515
532
|
const hasActions = this._accessibleViewSupportsNavigation.get() || this._accessibleViewVerbosityEnabled.get() || this._accessibleViewGoToSymbolSupported.get() || provider.actions?.length;
|
|
516
533
|
if (verbose && !showAccessibleViewHelp && hasActions) {
|
|
517
534
|
actionsHint = provider.options.position ? ( localize(
|
|
518
|
-
|
|
535
|
+
4185,
|
|
519
536
|
'Explore actions such as disabling this hint (Shift+Tab), use Escape to exit this dialog.'
|
|
520
|
-
)) : ( localize(
|
|
537
|
+
)) : ( localize(4186, 'Explore actions such as disabling this hint (Shift+Tab).'));
|
|
521
538
|
}
|
|
522
|
-
let ariaLabel = provider.options.type === AccessibleViewType.Help ? ( localize(
|
|
539
|
+
let ariaLabel = provider.options.type === AccessibleViewType.Help ? ( localize(4187, "Accessibility Help")) : ( localize(4188, "Accessible View"));
|
|
523
540
|
this._title.textContent = ariaLabel;
|
|
524
541
|
if (actionsHint && provider.options.type === AccessibleViewType.View) {
|
|
525
|
-
ariaLabel = ( localize(
|
|
542
|
+
ariaLabel = ( localize(4189, "Accessible View, {0}", actionsHint));
|
|
526
543
|
}
|
|
527
544
|
else if (actionsHint) {
|
|
528
|
-
ariaLabel = ( localize(
|
|
545
|
+
ariaLabel = ( localize(4190, "Accessibility Help, {0}", actionsHint));
|
|
529
546
|
}
|
|
530
547
|
if (isWindows && widgetIsFocused) {
|
|
531
548
|
ariaLabel = '';
|
|
@@ -596,7 +613,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
596
613
|
return disposableStore;
|
|
597
614
|
}
|
|
598
615
|
_updateToolbar(providedActions, type) {
|
|
599
|
-
this._toolbar.setAriaLabel(type === AccessibleViewType.Help ? ( localize(
|
|
616
|
+
this._toolbar.setAriaLabel(type === AccessibleViewType.Help ? ( localize(4191, 'Accessibility Help')) : ( localize(4192, "Accessible View")));
|
|
600
617
|
const toolbarMenu = this._register(this._menuService.createMenu(MenuId.AccessibleView, this._contextKeyService));
|
|
601
618
|
const menuActions = getFlatActionBarActions(toolbarMenu.getActions({}));
|
|
602
619
|
if (providedActions) {
|
|
@@ -698,9 +715,9 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
698
715
|
_accessibleViewHelpDialogContent(providerHasSymbols) {
|
|
699
716
|
const navigationHint = this._navigationHint();
|
|
700
717
|
const goToSymbolHint = this._goToSymbolHint(providerHasSymbols);
|
|
701
|
-
const toolbarHint = ( localize(
|
|
718
|
+
const toolbarHint = ( localize(4193, "Navigate to the toolbar (Shift+Tab)."));
|
|
702
719
|
const chatHints = this._getChatHints();
|
|
703
|
-
let hint = ( localize(
|
|
720
|
+
let hint = ( localize(4194, "In the accessible view, you can:\n"));
|
|
704
721
|
if (navigationHint) {
|
|
705
722
|
hint += ' - ' + navigationHint + '\n';
|
|
706
723
|
}
|
|
@@ -720,24 +737,24 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
720
737
|
return;
|
|
721
738
|
}
|
|
722
739
|
return [( localize(
|
|
723
|
-
|
|
740
|
+
4195,
|
|
724
741
|
" - Insert the code block at the cursor{0}.",
|
|
725
742
|
'<keybinding:workbench.action.chat.insertCodeBlock>'
|
|
726
743
|
)),
|
|
727
744
|
( localize(
|
|
728
|
-
|
|
745
|
+
4196,
|
|
729
746
|
" - Insert the code block into a new file{0}.",
|
|
730
747
|
'<keybinding:workbench.action.chat.insertIntoNewFile>'
|
|
731
748
|
)),
|
|
732
749
|
( localize(
|
|
733
|
-
|
|
750
|
+
4197,
|
|
734
751
|
" - Run the code block in the terminal{0}.\n",
|
|
735
752
|
'<keybinding:workbench.action.chat.runInTerminal>'
|
|
736
753
|
))].join('\n');
|
|
737
754
|
}
|
|
738
755
|
_navigationHint() {
|
|
739
756
|
return localize(
|
|
740
|
-
|
|
757
|
+
4198,
|
|
741
758
|
"Show the next item{0} or previous item{1}.",
|
|
742
759
|
`<keybinding:${AccessibilityCommandId.ShowNext}`,
|
|
743
760
|
`<keybinding:${AccessibilityCommandId.ShowPrevious}>`
|
|
@@ -746,7 +763,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
746
763
|
_disableVerbosityHint(provider) {
|
|
747
764
|
if (provider.options.type === AccessibleViewType.Help && this._verbosityEnabled()) {
|
|
748
765
|
return localize(
|
|
749
|
-
|
|
766
|
+
4199,
|
|
750
767
|
"\nDisable accessibility verbosity for this feature{0}.",
|
|
751
768
|
`<keybinding:${AccessibilityCommandId.DisableVerbosityHint}>`
|
|
752
769
|
);
|
|
@@ -758,7 +775,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
758
775
|
return;
|
|
759
776
|
}
|
|
760
777
|
return localize(
|
|
761
|
-
|
|
778
|
+
4200,
|
|
762
779
|
'Go to a symbol{0}.',
|
|
763
780
|
`<keybinding:${AccessibilityCommandId.GoToSymbol}>`
|
|
764
781
|
);
|
|
@@ -767,7 +784,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
767
784
|
const configureKb = this._keybindingService.lookupKeybinding(AccessibilityCommandId.AccessibilityHelpConfigureKeybindings)?.getAriaLabel();
|
|
768
785
|
const keybindingToConfigureQuickPick = configureKb ? '(' + configureKb + ')' : 'by assigning a keybinding to the command Accessibility Help Configure Unassigned Keybindings.';
|
|
769
786
|
return localize(
|
|
770
|
-
|
|
787
|
+
4201,
|
|
771
788
|
'\nConfigure keybindings for commands that lack them {0}.',
|
|
772
789
|
keybindingToConfigureQuickPick
|
|
773
790
|
);
|
|
@@ -776,7 +793,7 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
776
793
|
const configureKb = this._keybindingService.lookupKeybinding(AccessibilityCommandId.AccessibilityHelpConfigureAssignedKeybindings)?.getAriaLabel();
|
|
777
794
|
const keybindingToConfigureQuickPick = configureKb ? '(' + configureKb + ')' : 'by assigning a keybinding to the command Accessibility Help Configure Assigned Keybindings.';
|
|
778
795
|
return localize(
|
|
779
|
-
|
|
796
|
+
4202,
|
|
780
797
|
'\nConfigure keybindings for commands that already have assignments {0}.',
|
|
781
798
|
keybindingToConfigureQuickPick
|
|
782
799
|
);
|
|
@@ -798,11 +815,11 @@ let AccessibleView = class AccessibleView extends Disposable {
|
|
|
798
815
|
return screenReaderModeHint;
|
|
799
816
|
}
|
|
800
817
|
_exitDialogHint(provider) {
|
|
801
|
-
return this._verbosityEnabled() && !provider.options.position ? ( localize(
|
|
818
|
+
return this._verbosityEnabled() && !provider.options.position ? ( localize(4203, '\nExit this dialog (Escape).')) : '';
|
|
802
819
|
}
|
|
803
820
|
_readMoreHint(provider) {
|
|
804
821
|
return provider.options.readMoreUrl ? ( localize(
|
|
805
|
-
|
|
822
|
+
4204,
|
|
806
823
|
"\nOpen a browser window with more information related to accessibility{0}.",
|
|
807
824
|
`<keybinding:${AccessibilityCommandId.AccessibilityHelpOpenHelpLink}>`
|
|
808
825
|
)) : '';
|
|
@@ -823,7 +840,8 @@ AccessibleView = ( __decorate([
|
|
|
823
840
|
( __param(11, IChatCodeBlockContextProviderService)),
|
|
824
841
|
( __param(12, IStorageService)),
|
|
825
842
|
( __param(13, ITextModelService)),
|
|
826
|
-
( __param(14, IQuickInputService))
|
|
843
|
+
( __param(14, IQuickInputService)),
|
|
844
|
+
( __param(15, IAccessibilitySignalService))
|
|
827
845
|
], AccessibleView));
|
|
828
846
|
let AccessibleViewService = class AccessibleViewService extends Disposable {
|
|
829
847
|
constructor(_instantiationService, _configurationService, _keybindingService) {
|
|
@@ -863,11 +881,11 @@ let AccessibleViewService = class AccessibleViewService extends Disposable {
|
|
|
863
881
|
const keybinding = this._keybindingService.lookupKeybinding(AccessibilityCommandId.OpenAccessibleView)?.getAriaLabel();
|
|
864
882
|
let hint = null;
|
|
865
883
|
if (keybinding) {
|
|
866
|
-
hint = ( localize(
|
|
884
|
+
hint = ( localize(4205, "Inspect this in the accessible view with {0}", keybinding));
|
|
867
885
|
}
|
|
868
886
|
else {
|
|
869
887
|
hint = ( localize(
|
|
870
|
-
|
|
888
|
+
4206,
|
|
871
889
|
"Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."
|
|
872
890
|
));
|
|
873
891
|
}
|
|
@@ -909,8 +927,8 @@ let AccessibleViewSymbolQuickPick = class AccessibleViewSymbolQuickPick {
|
|
|
909
927
|
show(provider) {
|
|
910
928
|
const disposables = ( new DisposableStore());
|
|
911
929
|
const quickPick = disposables.add(this._quickInputService.createQuickPick());
|
|
912
|
-
quickPick.placeholder = ( localize(
|
|
913
|
-
quickPick.title = ( localize(
|
|
930
|
+
quickPick.placeholder = ( localize(4207, "Type to search symbols"));
|
|
931
|
+
quickPick.title = ( localize(4208, "Go to Symbol Accessible View"));
|
|
914
932
|
const picks = [];
|
|
915
933
|
const symbols = this._accessibleView.getSymbols();
|
|
916
934
|
if (!symbols) {
|
package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewKeybindingResolver.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MarkdownString } from "@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent";
|
|
2
2
|
import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
3
|
-
import { IPickerQuickAccessItem } from "@codingame/monaco-vscode-
|
|
3
|
+
import { IPickerQuickAccessItem } from "@codingame/monaco-vscode-d0fb86d3-2a47-594e-955b-9a24631a7124-common/vscode/vs/platform/quickinput/browser/pickerQuickAccess";
|
|
4
4
|
export declare function resolveContentAndKeybindingItems(keybindingService: IKeybindingService, value?: string): {
|
|
5
5
|
content: MarkdownString;
|
|
6
6
|
configureKeybindingItems: IPickerQuickAccessItem[] | undefined;
|
|
@@ -16,11 +16,11 @@ class ShowSignalSoundHelp extends Action2 {
|
|
|
16
16
|
constructor() {
|
|
17
17
|
super({
|
|
18
18
|
id: ShowSignalSoundHelp.ID,
|
|
19
|
-
title: ( localize2(
|
|
19
|
+
title: ( localize2(4221, "Help: List Signal Sounds")),
|
|
20
20
|
f1: true,
|
|
21
21
|
metadata: {
|
|
22
22
|
description: ( localize(
|
|
23
|
-
|
|
23
|
+
4222,
|
|
24
24
|
"List all accessibility sounds, noises, or audio cues and configure their settings"
|
|
25
25
|
))
|
|
26
26
|
}
|
|
@@ -38,7 +38,7 @@ class ShowSignalSoundHelp extends Action2 {
|
|
|
38
38
|
signal,
|
|
39
39
|
buttons: userGestureSignals.includes(signal) ? [{
|
|
40
40
|
iconClass: ThemeIcon.asClassName(Codicon.settingsGear),
|
|
41
|
-
tooltip: ( localize(
|
|
41
|
+
tooltip: ( localize(4223, 'Configure Sound')),
|
|
42
42
|
alwaysVisible: true
|
|
43
43
|
}] : []
|
|
44
44
|
}))).sort((a, b) => a.label.localeCompare(b.label));
|
|
@@ -74,7 +74,7 @@ class ShowSignalSoundHelp extends Action2 {
|
|
|
74
74
|
accessibilitySignalService.playSound(qp.activeItems[0].signal.sound.getSound(true), true, AcknowledgeDocCommentsToken);
|
|
75
75
|
}));
|
|
76
76
|
disposables.add(qp.onDidHide(() => disposables.dispose()));
|
|
77
|
-
qp.placeholder = ( localize(
|
|
77
|
+
qp.placeholder = ( localize(4224, 'Select a sound to play and configure'));
|
|
78
78
|
qp.canSelectMany = true;
|
|
79
79
|
await qp.show();
|
|
80
80
|
}
|
|
@@ -87,11 +87,11 @@ class ShowAccessibilityAnnouncementHelp extends Action2 {
|
|
|
87
87
|
constructor() {
|
|
88
88
|
super({
|
|
89
89
|
id: ShowAccessibilityAnnouncementHelp.ID,
|
|
90
|
-
title: ( localize2(
|
|
90
|
+
title: ( localize2(4225, "Help: List Signal Announcements")),
|
|
91
91
|
f1: true,
|
|
92
92
|
metadata: {
|
|
93
93
|
description: ( localize(
|
|
94
|
-
|
|
94
|
+
4226,
|
|
95
95
|
"List all accessibility announcements, alerts, braille messages, and configure their settings"
|
|
96
96
|
))
|
|
97
97
|
}
|
|
@@ -109,7 +109,7 @@ class ShowAccessibilityAnnouncementHelp extends Action2 {
|
|
|
109
109
|
signal,
|
|
110
110
|
buttons: userGestureSignals.includes(signal) ? [{
|
|
111
111
|
iconClass: ThemeIcon.asClassName(Codicon.settingsGear),
|
|
112
|
-
tooltip: ( localize(
|
|
112
|
+
tooltip: ( localize(4227, 'Configure Announcement')),
|
|
113
113
|
alwaysVisible: true,
|
|
114
114
|
}] : []
|
|
115
115
|
}))).sort((a, b) => a.label.localeCompare(b.label));
|
|
@@ -142,8 +142,8 @@ class ShowAccessibilityAnnouncementHelp extends Action2 {
|
|
|
142
142
|
preferencesService.openUserSettings({ jsonEditor: true, revealSetting: { key: e.item.signal.settingsKey, edit: true } });
|
|
143
143
|
}));
|
|
144
144
|
disposables.add(qp.onDidHide(() => disposables.dispose()));
|
|
145
|
-
qp.placeholder = screenReaderOptimized ? ( localize(
|
|
146
|
-
|
|
145
|
+
qp.placeholder = screenReaderOptimized ? ( localize(4228, 'Select an announcement to configure')) : ( localize(
|
|
146
|
+
4229,
|
|
147
147
|
'Screen reader is not active, announcements are disabled by default.'
|
|
148
148
|
));
|
|
149
149
|
qp.canSelectMany = true;
|
package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/openDiffEditorAnnouncement.js
CHANGED
|
@@ -36,7 +36,7 @@ let DiffEditorActiveAnnouncementContribution = class DiffEditorActiveAnnouncemen
|
|
|
36
36
|
}
|
|
37
37
|
this._onDidActiveEditorChangeListener = this._register(this._editorService.onDidActiveEditorChange(() => {
|
|
38
38
|
if (isDiffEditor(this._editorService.activeTextEditorControl)) {
|
|
39
|
-
this._accessibilityService.alert(( localize(
|
|
39
|
+
this._accessibilityService.alert(( localize(4230, "Diff editor")));
|
|
40
40
|
}
|
|
41
41
|
}));
|
|
42
42
|
}
|
|
@@ -17,10 +17,10 @@ class ToggleScreenReaderMode extends Action2 {
|
|
|
17
17
|
constructor() {
|
|
18
18
|
super({
|
|
19
19
|
id: 'editor.action.toggleScreenReaderAccessibilityMode',
|
|
20
|
-
title: ( localize2(
|
|
20
|
+
title: ( localize2(5123, "Toggle Screen Reader Accessibility Mode")),
|
|
21
21
|
metadata: {
|
|
22
22
|
description: ( localize2(
|
|
23
|
-
|
|
23
|
+
5124,
|
|
24
24
|
"Toggles an optimized mode for usage with screen readers, braille devices, and other assistive technologies."
|
|
25
25
|
)),
|
|
26
26
|
},
|