@codingame/monaco-vscode-accessibility-service-override 25.1.2 → 26.0.1
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 +25 -5
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityStatus.js +44 -39
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.d.ts +3 -8
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.js +282 -218
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewKeybindingResolver.js +7 -4
- package/vscode/src/vs/workbench/contrib/accessibility/browser/extensionAccesibilityHelp.contribution.js +14 -14
- package/vscode/src/vs/workbench/contrib/accessibility/browser/unfocusedViewDimmingContribution.js +58 -35
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution.js +10 -2
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignalDebuggerContribution.js +16 -12
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/commands.js +93 -41
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/editorTextPropertySignalsContribution.js +65 -68
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/openDiffEditorAnnouncement.js +9 -8
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/saveAccessibilitySignal.js +9 -6
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/accessibility/accessibility.js +25 -18
- package/vscode/src/vs/workbench/contrib/speech/browser/speechAccessibilitySignal.js +10 -7
- package/vscode/src/vs/workbench/services/accessibility/common/accessibleViewInformationService.js +6 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-accessibility-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "26.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - accessibility service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "
|
|
18
|
+
"@codingame/monaco-vscode-api": "26.0.1",
|
|
19
19
|
"marked": "14.0.0"
|
|
20
20
|
},
|
|
21
21
|
"main": "index.js",
|
|
@@ -23,8 +23,28 @@ workbenchRegistry.registerWorkbenchContribution(UnfocusedViewDimmingContribution
|
|
|
23
23
|
workbenchRegistry.registerWorkbenchContribution(AccesibleViewHelpContribution, LifecyclePhase.Eventually);
|
|
24
24
|
workbenchRegistry.registerWorkbenchContribution(AccesibleViewContributions, LifecyclePhase.Eventually);
|
|
25
25
|
registerWorkbenchContribution2(AccessibilityStatus.ID, AccessibilityStatus, WorkbenchPhase.BlockRestore);
|
|
26
|
-
registerWorkbenchContribution2(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
registerWorkbenchContribution2(
|
|
27
|
+
ExtensionAccessibilityHelpDialogContribution.ID,
|
|
28
|
+
ExtensionAccessibilityHelpDialogContribution,
|
|
29
|
+
WorkbenchPhase.BlockRestore
|
|
30
|
+
);
|
|
31
|
+
registerWorkbenchContribution2(
|
|
32
|
+
SaveAccessibilitySignalContribution.ID,
|
|
33
|
+
SaveAccessibilitySignalContribution,
|
|
34
|
+
WorkbenchPhase.AfterRestored
|
|
35
|
+
);
|
|
36
|
+
registerWorkbenchContribution2(
|
|
37
|
+
SpeechAccessibilitySignalContribution.ID,
|
|
38
|
+
SpeechAccessibilitySignalContribution,
|
|
39
|
+
WorkbenchPhase.AfterRestored
|
|
40
|
+
);
|
|
41
|
+
registerWorkbenchContribution2(
|
|
42
|
+
DiffEditorActiveAnnouncementContribution.ID,
|
|
43
|
+
DiffEditorActiveAnnouncementContribution,
|
|
44
|
+
WorkbenchPhase.AfterRestored
|
|
45
|
+
);
|
|
46
|
+
registerWorkbenchContribution2(
|
|
47
|
+
DynamicSpeechAccessibilityConfiguration.ID,
|
|
48
|
+
DynamicSpeechAccessibilityConfiguration,
|
|
49
|
+
WorkbenchPhase.AfterRestored
|
|
50
|
+
);
|
|
@@ -15,8 +15,16 @@ import { IStatusbarService } from '@codingame/monaco-vscode-api/vscode/vs/workbe
|
|
|
15
15
|
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
16
16
|
|
|
17
17
|
let AccessibilityStatus = class AccessibilityStatus extends Disposable {
|
|
18
|
-
static {
|
|
19
|
-
|
|
18
|
+
static {
|
|
19
|
+
this.ID = "workbench.contrib.accessibilityStatus";
|
|
20
|
+
}
|
|
21
|
+
constructor(
|
|
22
|
+
configurationService,
|
|
23
|
+
notificationService,
|
|
24
|
+
accessibilityService,
|
|
25
|
+
statusbarService,
|
|
26
|
+
openerService
|
|
27
|
+
) {
|
|
20
28
|
super();
|
|
21
29
|
this.configurationService = configurationService;
|
|
22
30
|
this.notificationService = notificationService;
|
|
@@ -26,40 +34,44 @@ let AccessibilityStatus = class AccessibilityStatus extends Disposable {
|
|
|
26
34
|
this.screenReaderNotification = null;
|
|
27
35
|
this.promptedScreenReader = false;
|
|
28
36
|
this.screenReaderModeElement = this._register(( new MutableDisposable()));
|
|
29
|
-
this._register(CommandsRegistry.registerCommand({
|
|
37
|
+
this._register(CommandsRegistry.registerCommand({
|
|
38
|
+
id: "showEditorScreenReaderNotification",
|
|
39
|
+
handler: () => this.showScreenReaderNotification()
|
|
40
|
+
}));
|
|
30
41
|
this.updateScreenReaderModeElement(this.accessibilityService.isScreenReaderOptimized());
|
|
31
42
|
this.registerListeners();
|
|
32
43
|
}
|
|
33
44
|
registerListeners() {
|
|
34
|
-
this._register(
|
|
45
|
+
this._register(
|
|
46
|
+
this.accessibilityService.onDidChangeScreenReaderOptimized(() => this.onScreenReaderModeChange())
|
|
47
|
+
);
|
|
35
48
|
this._register(this.configurationService.onDidChangeConfiguration(c => {
|
|
36
|
-
if (c.affectsConfiguration(
|
|
49
|
+
if (c.affectsConfiguration("editor.accessibilitySupport")) {
|
|
37
50
|
this.onScreenReaderModeChange();
|
|
38
51
|
}
|
|
39
52
|
}));
|
|
40
53
|
}
|
|
41
54
|
showScreenReaderNotification() {
|
|
42
55
|
this.screenReaderNotification = this.notificationService.prompt(Severity.Info, ( localize(
|
|
43
|
-
|
|
56
|
+
4386,
|
|
44
57
|
"Screen reader usage detected. Do you want to enable {0} to optimize the editor for screen reader usage?",
|
|
45
|
-
|
|
58
|
+
"editor.accessibilitySupport"
|
|
46
59
|
)), [{
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}], {
|
|
60
|
+
label: ( localize(4387, "Yes")),
|
|
61
|
+
run: () => {
|
|
62
|
+
this.configurationService.updateValue("editor.accessibilitySupport", "on", ConfigurationTarget.USER);
|
|
63
|
+
}
|
|
64
|
+
}, {
|
|
65
|
+
label: ( localize(4388, "No")),
|
|
66
|
+
run: () => {
|
|
67
|
+
this.configurationService.updateValue("editor.accessibilitySupport", "off", ConfigurationTarget.USER);
|
|
68
|
+
}
|
|
69
|
+
}, {
|
|
70
|
+
label: ( localize(4389, "Learn More")),
|
|
71
|
+
run: () => {
|
|
72
|
+
this.openerService.open("https://code.visualstudio.com/docs/editor/accessibility#_screen-readers");
|
|
73
|
+
}
|
|
74
|
+
}], {
|
|
63
75
|
sticky: true,
|
|
64
76
|
priority: NotificationPriority.URGENT
|
|
65
77
|
});
|
|
@@ -68,26 +80,25 @@ let AccessibilityStatus = class AccessibilityStatus extends Disposable {
|
|
|
68
80
|
updateScreenReaderModeElement(visible) {
|
|
69
81
|
if (visible) {
|
|
70
82
|
if (!this.screenReaderModeElement.value) {
|
|
71
|
-
const text = ( localize(
|
|
83
|
+
const text = ( localize(4390, "Screen Reader Optimized"));
|
|
72
84
|
this.screenReaderModeElement.value = this.statusbarService.addEntry({
|
|
73
|
-
name: ( localize(
|
|
85
|
+
name: ( localize(4391, "Screen Reader Mode")),
|
|
74
86
|
text,
|
|
75
87
|
ariaLabel: text,
|
|
76
|
-
command:
|
|
77
|
-
kind:
|
|
88
|
+
command: "showEditorScreenReaderNotification",
|
|
89
|
+
kind: "prominent",
|
|
78
90
|
showInAllWindows: true
|
|
79
|
-
},
|
|
91
|
+
}, "status.editor.screenReaderMode", StatusbarAlignment.RIGHT, 100.6);
|
|
80
92
|
}
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
93
|
+
} else {
|
|
83
94
|
this.screenReaderModeElement.clear();
|
|
84
95
|
}
|
|
85
96
|
}
|
|
86
97
|
onScreenReaderModeChange() {
|
|
87
98
|
const screenReaderDetected = this.accessibilityService.isScreenReaderOptimized();
|
|
88
99
|
if (screenReaderDetected) {
|
|
89
|
-
const screenReaderConfiguration = this.configurationService.getValue(
|
|
90
|
-
if (screenReaderConfiguration ===
|
|
100
|
+
const screenReaderConfiguration = this.configurationService.getValue("editor.accessibilitySupport");
|
|
101
|
+
if (screenReaderConfiguration === "auto") {
|
|
91
102
|
if (!this.promptedScreenReader) {
|
|
92
103
|
this.promptedScreenReader = true;
|
|
93
104
|
setTimeout(() => this.showScreenReaderNotification(), 100);
|
|
@@ -100,12 +111,6 @@ let AccessibilityStatus = class AccessibilityStatus extends Disposable {
|
|
|
100
111
|
this.updateScreenReaderModeElement(this.accessibilityService.isScreenReaderOptimized());
|
|
101
112
|
}
|
|
102
113
|
};
|
|
103
|
-
AccessibilityStatus = ( __decorate([
|
|
104
|
-
( __param(0, IConfigurationService)),
|
|
105
|
-
( __param(1, INotificationService)),
|
|
106
|
-
( __param(2, IAccessibilityService)),
|
|
107
|
-
( __param(3, IStatusbarService)),
|
|
108
|
-
( __param(4, IOpenerService))
|
|
109
|
-
], AccessibilityStatus));
|
|
114
|
+
AccessibilityStatus = ( __decorate([( __param(0, IConfigurationService)), ( __param(1, INotificationService)), ( __param(2, IAccessibilityService)), ( __param(3, IStatusbarService)), ( __param(4, IOpenerService))], AccessibilityStatus));
|
|
110
115
|
|
|
111
116
|
export { AccessibilityStatus };
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
-
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
2
|
import { CodeEditorWidget } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/widget/codeEditor/codeEditorWidget";
|
|
4
3
|
import { IPosition, Position } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/position";
|
|
5
|
-
import { ITextModel } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/model";
|
|
6
4
|
import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service";
|
|
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
5
|
import { AccessibleContentProvider, AccessibleViewProviderId, ExtensionContentProvider, IAccessibleViewSymbol } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView";
|
|
10
6
|
import { IAccessibleViewService } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView.service";
|
|
11
7
|
import { IAccessibilityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility.service";
|
|
@@ -25,7 +21,7 @@ import { IChatCodeBlockContextProviderService } from "@codingame/monaco-vscode-a
|
|
|
25
21
|
import { ICodeBlockActionContext } from "@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart";
|
|
26
22
|
import { AccessibilityVerbositySettingId } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration";
|
|
27
23
|
export type AccesibleViewContentProvider = AccessibleContentProvider | ExtensionContentProvider;
|
|
28
|
-
export declare class AccessibleView extends Disposable
|
|
24
|
+
export declare class AccessibleView extends Disposable {
|
|
29
25
|
private readonly _openerService;
|
|
30
26
|
private readonly _instantiationService;
|
|
31
27
|
private readonly _configurationService;
|
|
@@ -39,7 +35,6 @@ export declare class AccessibleView extends Disposable implements ITextModelCont
|
|
|
39
35
|
private readonly _commandService;
|
|
40
36
|
private readonly _codeBlockContextProviderService;
|
|
41
37
|
private readonly _storageService;
|
|
42
|
-
private readonly textModelResolverService;
|
|
43
38
|
private readonly _quickInputService;
|
|
44
39
|
private readonly _accessibilitySignalService;
|
|
45
40
|
private _editorWidget;
|
|
@@ -64,9 +59,8 @@ export declare class AccessibleView extends Disposable implements ITextModelCont
|
|
|
64
59
|
private _currentContent;
|
|
65
60
|
private _lastProvider;
|
|
66
61
|
private _viewContainer;
|
|
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,
|
|
62
|
+
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, _quickInputService: IQuickInputService, _accessibilitySignalService: IAccessibilitySignalService);
|
|
68
63
|
private _playDiffSignals;
|
|
69
|
-
provideTextContent(resource: URI): Promise<ITextModel | null> | null;
|
|
70
64
|
private _resetContextKeys;
|
|
71
65
|
getPosition(id?: AccessibleViewProviderId): Position | undefined;
|
|
72
66
|
setPosition(position: Position, reveal?: boolean, select?: boolean): void;
|
|
@@ -86,6 +80,7 @@ export declare class AccessibleView extends Disposable implements ITextModelCont
|
|
|
86
80
|
showSymbol(provider: AccesibleViewContentProvider, symbol: IAccessibleViewSymbol): void;
|
|
87
81
|
disableHint(): void;
|
|
88
82
|
private _updateContextKeys;
|
|
83
|
+
private _getStableUri;
|
|
89
84
|
private _updateContent;
|
|
90
85
|
private _render;
|
|
91
86
|
private _updateToolbar;
|