@@ -54,6 +54,8 @@ import { isString } from 'vs/base/common/types';
54
54
import { SuggestEnabledInput } from 'vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput' ;
55
55
import { CompletionItemKind } from 'vs/editor/common/languages' ;
56
56
import { settingsTextInputBorder } from 'vs/workbench/contrib/preferences/common/settingsEditorColorRegistry' ;
57
+ import { IConfigurationService } from 'vs/platform/configuration/common/configuration' ;
58
+ import { AccessibilityVerbositySettingId } from 'vs/workbench/contrib/accessibility/browser/accessibilityContribution' ;
57
59
58
60
const $ = DOM . $ ;
59
61
@@ -112,7 +114,8 @@ export class KeybindingsEditor extends EditorPane implements IKeybindingsEditorP
112
114
@IClipboardService private readonly clipboardService : IClipboardService ,
113
115
@IInstantiationService private readonly instantiationService : IInstantiationService ,
114
116
@IEditorService private readonly editorService : IEditorService ,
115
- @IStorageService storageService : IStorageService
117
+ @IStorageService storageService : IStorageService ,
118
+ @IConfigurationService private readonly configurationService : IConfigurationService
116
119
) {
117
120
super ( KeybindingsEditor . ID , telemetryService , themeService , storageService ) ;
118
121
this . delayedFiltering = new Delayer < void > ( 300 ) ;
@@ -474,7 +477,7 @@ export class KeybindingsEditor extends EditorPane implements IKeybindingsEditorP
474
477
{
475
478
identityProvider : { getId : ( e : IKeybindingItemEntry ) => e . id } ,
476
479
horizontalScrolling : false ,
477
- accessibilityProvider : new AccessibilityProvider ( ) ,
480
+ accessibilityProvider : new AccessibilityProvider ( this . configurationService ) ,
478
481
keyboardNavigationLabelProvider : { getKeyboardNavigationLabel : ( e : IKeybindingItemEntry ) => e . keybindingItem . commandLabel || e . keybindingItem . command } ,
479
482
overrideStyles : {
480
483
listBackground : editorBackground
@@ -1178,6 +1181,8 @@ class WhenColumnRenderer implements ITableRenderer<IKeybindingItemEntry, IWhenCo
1178
1181
1179
1182
class AccessibilityProvider implements IListAccessibilityProvider < IKeybindingItemEntry > {
1180
1183
1184
+ constructor ( private readonly configurationService : IConfigurationService ) { }
1185
+
1181
1186
getWidgetAriaLabel ( ) : string {
1182
1187
return localize ( 'keybindingsLabel' , "Keybindings" ) ;
1183
1188
}
@@ -1187,6 +1192,7 @@ class AccessibilityProvider implements IListAccessibilityProvider<IKeybindingIte
1187
1192
ariaLabel += ', ' + ( keybindingItemEntry . keybindingItem . keybinding ?. getAriaLabel ( ) || localize ( 'noKeybinding' , "No Keybinding assigned." ) ) ;
1188
1193
ariaLabel += ', ' + keybindingItemEntry . keybindingItem . when ? keybindingItemEntry . keybindingItem . when : localize ( 'noWhen' , "No when context." ) ;
1189
1194
ariaLabel += ', ' + ( isString ( keybindingItemEntry . keybindingItem . source ) ? keybindingItemEntry . keybindingItem . source : keybindingItemEntry . keybindingItem . source . description ?? keybindingItemEntry . keybindingItem . source . identifier . value ) ;
1195
+ ariaLabel += this . configurationService . getValue ( AccessibilityVerbositySettingId . KeybindingsEditor ) ? localize ( 'keyboard shortcuts arial label' , ", use space or enter to change the keybinding." ) : '' ;
1190
1196
return ariaLabel ;
1191
1197
}
1192
1198
}
0 commit comments