@@ -11,7 +11,7 @@ import { AccessibilityHelpNLS } from 'vs/editor/common/standaloneStrings';
11
11
import { ToggleTabFocusModeAction } from 'vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode' ;
12
12
import { localize } from 'vs/nls' ;
13
13
import { InstantiationType , registerSingleton } from 'vs/platform/instantiation/common/extensions' ;
14
- import { IKeybindingService , IKeyboardEvent } from 'vs/platform/keybinding/common/keybinding' ;
14
+ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding' ;
15
15
import { AccessibilityHelpAction , AccessibleViewAction , registerAccessibilityConfiguration } from 'vs/workbench/contrib/accessibility/browser/accessibilityContribution' ;
16
16
import * as strings from 'vs/base/common/strings' ;
17
17
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation' ;
@@ -26,7 +26,6 @@ import { EditorContextKeys } from 'vs/editor/common/editorContextKeys';
26
26
import { getNotificationFromContext } from 'vs/workbench/browser/parts/notifications/notificationsCommands' ;
27
27
import { IListService , WorkbenchList } from 'vs/platform/list/browser/listService' ;
28
28
import { NotificationFocusedContext } from 'vs/workbench/common/contextkeys' ;
29
- import { KeyCode } from 'vs/base/common/keyCodes' ;
30
29
import { IAccessibleViewService , AccessibleViewService , IAccessibleContentProvider , IAccessibleViewOptions , AccessibleViewType } from 'vs/workbench/contrib/accessibility/browser/accessibleView' ;
31
30
32
31
registerAccessibilityConfiguration ( ) ;
@@ -157,6 +156,7 @@ class NotificationAccessibleViewContribution extends Disposable {
157
156
this . _register ( AccessibleViewAction . addImplementation ( 90 , 'notifications' , accessor => {
158
157
const accessibleViewService = accessor . get ( IAccessibleViewService ) ;
159
158
const listService = accessor . get ( IListService ) ;
159
+ const commandService = accessor . get ( ICommandService ) ;
160
160
161
161
function show ( ) : boolean {
162
162
const notification = getNotificationFromContext ( listService ) ;
@@ -172,22 +172,17 @@ class NotificationAccessibleViewContribution extends Disposable {
172
172
return false ;
173
173
}
174
174
accessibleViewService . show ( {
175
- provideContent : ( ) => { return notification . message . original . toString ( ) || '' ; } ,
175
+ provideContent : ( ) => {
176
+ return localize ( 'notification.accessibleView' , '{0} Source: {1}' , notification . message . original . toString ( ) || '' , notification . source ) ;
177
+ } ,
176
178
onClose ( ) : void {
179
+ // The notification list might have hidden depending on the elapsed time, so show it.
180
+ commandService . executeCommand ( 'notifications.showList' ) ;
177
181
if ( list && notificationIndex !== undefined ) {
178
182
list . domFocus ( ) ;
179
183
list . setFocus ( [ notificationIndex ] ) ;
180
184
}
181
185
} ,
182
- onKeyDown ( e : IKeyboardEvent ) : void {
183
- if ( e . keyCode === KeyCode . DownArrow && e . altKey && e . ctrlKey ) {
184
- list ?. focusNext ( ) ;
185
- show ( ) ;
186
- } else if ( e . keyCode === KeyCode . UpArrow && e . altKey && e . ctrlKey ) {
187
- list ?. focusPrevious ( ) ;
188
- show ( ) ;
189
- }
190
- } ,
191
186
verbositySettingKey : 'notifications' ,
192
187
options : {
193
188
ariaLabel : localize ( 'notification' , "Notification Accessible View" ) ,
0 commit comments