@@ -20,7 +20,12 @@ import { IContextMenuService } from 'vs/platform/contextview/browser/contextView
20
20
import { assertIsDefined , assertAllDefined } from 'vs/base/common/types' ;
21
21
import { Codicon } from 'vs/base/common/codicons' ;
22
22
23
+ export interface INotificationsListOptions extends IListOptions < INotificationViewItem > {
24
+ widgetAriaLabel ?: string ;
25
+ }
26
+
23
27
export class NotificationsList extends Themable {
28
+
24
29
private listContainer : HTMLElement | undefined ;
25
30
private list : WorkbenchList < INotificationViewItem > | undefined ;
26
31
private listDelegate : NotificationsListDelegate | undefined ;
@@ -29,7 +34,7 @@ export class NotificationsList extends Themable {
29
34
30
35
constructor (
31
36
private readonly container : HTMLElement ,
32
- private readonly options : IListOptions < INotificationViewItem > ,
37
+ private readonly options : INotificationsListOptions ,
33
38
@IInstantiationService private readonly instantiationService : IInstantiationService ,
34
39
@IThemeService themeService : IThemeService ,
35
40
@IContextMenuService private readonly contextMenuService : IContextMenuService
@@ -75,14 +80,15 @@ export class NotificationsList extends Themable {
75
80
76
81
// List
77
82
const listDelegate = this . listDelegate = new NotificationsListDelegate ( this . listContainer ) ;
83
+ const options = this . options ;
78
84
const list = this . list = < WorkbenchList < INotificationViewItem > > this . _register ( this . instantiationService . createInstance (
79
85
WorkbenchList ,
80
86
'NotificationsList' ,
81
87
this . listContainer ,
82
88
listDelegate ,
83
89
[ renderer ] ,
84
90
{
85
- ...this . options ,
91
+ ...options ,
86
92
setRowLineHeight : false ,
87
93
horizontalScrolling : false ,
88
94
overrideStyles : {
@@ -97,7 +103,7 @@ export class NotificationsList extends Themable {
97
103
return localize ( 'notificationWithSourceAriaLabel' , "{0}, source: {1}, notification" , element . message . raw , element . source ) ;
98
104
} ,
99
105
getWidgetAriaLabel ( ) : string {
100
- return localize ( 'notificationsList' , "Notifications List" ) ;
106
+ return options . widgetAriaLabel ?? localize ( 'notificationsList' , "Notifications List" ) ;
101
107
} ,
102
108
getRole ( ) : string {
103
109
return 'dialog' ; // https://github.com/microsoft/vscode/issues/82728
0 commit comments