@@ -28,6 +28,7 @@ import { IListService, WorkbenchList } from 'vs/platform/list/browser/listServic
28
28
import { NotificationFocusedContext } from 'vs/workbench/common/contextkeys' ;
29
29
import { IAccessibleViewService , AccessibleViewService , IAccessibleContentProvider , IAccessibleViewOptions , AccessibleViewType , accessibleViewIsShown } from 'vs/workbench/contrib/accessibility/browser/accessibleView' ;
30
30
import { IHoverService } from 'vs/workbench/services/hover/browser/hover' ;
31
+ import { alert } from 'vs/base/browser/ui/aria/aria' ;
31
32
32
33
registerAccessibilityConfiguration ( ) ;
33
34
registerSingleton ( IAccessibleViewService , AccessibleViewService , InstantiationType . Delayed ) ;
@@ -173,13 +174,16 @@ class NotificationAccessibleViewContribution extends Disposable {
173
174
}
174
175
commandService . executeCommand ( 'notifications.showList' ) ;
175
176
let notificationIndex : number | undefined ;
177
+ let length : number | undefined ;
176
178
const list = listService . lastFocusedList ;
177
179
if ( list instanceof WorkbenchList ) {
178
180
notificationIndex = list . indexOf ( notification ) ;
181
+ length = list . length ;
179
182
}
180
183
if ( notificationIndex === undefined ) {
181
184
return false ;
182
185
}
186
+
183
187
function focusList ( ) : void {
184
188
commandService . executeCommand ( 'notifications.showList' ) ;
185
189
if ( list && notificationIndex !== undefined ) {
@@ -206,6 +210,12 @@ class NotificationAccessibleViewContribution extends Disposable {
206
210
}
207
211
focusList ( ) ;
208
212
list . focusNext ( ) ;
213
+ if ( notificationIndex ) {
214
+ const notificationNumber = notificationIndex + 1 ;
215
+ if ( ! ! notificationNumber && ! ! length && notificationNumber + 1 <= length ) {
216
+ alert ( `Focused ${ notificationNumber + 1 } of ${ length } ` ) ;
217
+ }
218
+ }
209
219
renderAccessibleView ( ) ;
210
220
} ,
211
221
previous ( ) : void {
@@ -214,6 +224,12 @@ class NotificationAccessibleViewContribution extends Disposable {
214
224
}
215
225
focusList ( ) ;
216
226
list . focusPrevious ( ) ;
227
+ if ( notificationIndex ) {
228
+ const notificationNumber = notificationIndex + 1 ;
229
+ if ( ! ! notificationNumber && ! ! length && notificationNumber - 1 > 0 ) {
230
+ alert ( `Focused ${ notificationNumber - 1 } of ${ length } ` ) ;
231
+ }
232
+ }
217
233
renderAccessibleView ( ) ;
218
234
} ,
219
235
verbositySettingKey : AccessibilityVerbositySettingId . Notification ,
0 commit comments