Skip to content

Commit b7bf8b0

Browse files
committed
fix
1 parent f7a4e0d commit b7bf8b0

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

src/vs/workbench/contrib/accessibility/browser/accessibility.contribution.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ class NotificationAccessibleViewContribution extends Disposable {
210210
}
211211
focusList();
212212
list.focusNext();
213-
if (notificationIndex) {
213+
if (!!notificationIndex) {
214214
const notificationNumber = notificationIndex + 1;
215215
if (!!notificationNumber && !!length && notificationNumber + 1 <= length) {
216216
alert(`Focused ${notificationNumber + 1} of ${length}`);
@@ -224,7 +224,7 @@ class NotificationAccessibleViewContribution extends Disposable {
224224
}
225225
focusList();
226226
list.focusPrevious();
227-
if (notificationIndex) {
227+
if (!!notificationIndex) {
228228
const notificationNumber = notificationIndex + 1;
229229
if (!!notificationNumber && !!length && notificationNumber - 1 > 0) {
230230
alert(`Focused ${notificationNumber - 1} of ${length}`);

src/vs/workbench/contrib/chat/browser/chat.contribution.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,18 +193,20 @@ class ChatAccessibleViewContribution extends Disposable {
193193
},
194194
next() {
195195
verifiedWidget.moveFocus(focusedItem, 'next');
196-
if (responseIndex) {
197-
if (!!responseIndex && !!length && responseIndex + 1 <= length) {
198-
alert(`Focused ${responseIndex + 1} of ${length}`);
196+
if (!!responseIndex) {
197+
const notificationNumber = responseIndex + 1;
198+
if (!!notificationNumber && !!length && notificationNumber + 1 <= length) {
199+
alert(`Focused ${notificationNumber + 1} of ${length}`);
199200
}
200201
}
201202
renderAccessibleView(accessibleViewService, widgetService, codeEditorService);
202203
},
203204
previous() {
204205
verifiedWidget.moveFocus(focusedItem, 'previous');
205-
if (responseIndex) {
206-
if (!!responseIndex && !!length && responseIndex - 1 > 0) {
207-
alert(`Focused ${responseIndex + 1} of ${length}`);
206+
if (!!responseIndex) {
207+
const notificationNumber = responseIndex + 1;
208+
if (!!notificationNumber && !!length && notificationNumber - 1 > 0) {
209+
alert(`Focused ${notificationNumber - 1} of ${length}`);
208210
}
209211
}
210212
renderAccessibleView(accessibleViewService, widgetService, codeEditorService);

0 commit comments

Comments
 (0)