@@ -44,7 +44,7 @@ import { CONTEXT_IN_CHAT_SESSION } from 'vs/workbench/contrib/chat/common/chatCo
44
44
import { ChatAccessibilityService } from 'vs/workbench/contrib/chat/browser/chatAccessibilityService' ;
45
45
import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService' ;
46
46
import { QuickQuestionMode } from 'vs/workbench/contrib/chat/browser/actions/quickQuestionActions/quickQuestionAction' ;
47
- import { alert } from 'vs/base/browser/ui/aria/aria ' ;
47
+ import { alertFocusChange } from 'vs/workbench/contrib/accessibility/browser/accessibility.contribution ' ;
48
48
49
49
// Register configuration
50
50
const configurationRegistry = Registry . as < IConfigurationRegistry > ( ConfigurationExtensions . Configuration ) ;
@@ -193,22 +193,12 @@ class ChatAccessibleViewContribution extends Disposable {
193
193
} ,
194
194
next ( ) {
195
195
verifiedWidget . moveFocus ( focusedItem , 'next' ) ;
196
- if ( ! ! responseIndex ) {
197
- const notificationNumber = responseIndex + 1 ;
198
- if ( ! ! notificationNumber && ! ! length && notificationNumber + 1 <= length ) {
199
- alert ( `Focused ${ notificationNumber + 1 } of ${ length } ` ) ;
200
- }
201
- }
196
+ alertFocusChange ( responseIndex , length , 'next' ) ;
202
197
renderAccessibleView ( accessibleViewService , widgetService , codeEditorService ) ;
203
198
} ,
204
199
previous ( ) {
205
200
verifiedWidget . moveFocus ( focusedItem , 'previous' ) ;
206
- if ( ! ! responseIndex ) {
207
- const notificationNumber = responseIndex + 1 ;
208
- if ( ! ! notificationNumber && ! ! length && notificationNumber - 1 > 0 ) {
209
- alert ( `Focused ${ notificationNumber - 1 } of ${ length } ` ) ;
210
- }
211
- }
201
+ alertFocusChange ( responseIndex , length , 'previous' ) ;
212
202
renderAccessibleView ( accessibleViewService , widgetService , codeEditorService ) ;
213
203
} ,
214
204
options : { ariaLabel : nls . localize ( 'chatAccessibleView' , "Chat Accessible View" ) , type : AccessibleViewType . View }
0 commit comments