Skip to content

Commit 092bbc8

Browse files
Don't set aria-activedescendant if input box does not have focus. (microsoft#257123)
Fixes microsoft#251068
1 parent 9e37f46 commit 092bbc8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/vs/platform/quickinput/browser/quickInputController.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,9 @@ export class QuickInputController extends Disposable {
213213
const list = this._register(this.instantiationService.createInstance(QuickInputTree, container, this.options.hoverDelegate, this.options.linkOpenerDelegate, listId));
214214
inputBox.setAttribute('aria-controls', listId);
215215
this._register(list.onDidChangeFocus(() => {
216-
inputBox.setAttribute('aria-activedescendant', list.getActiveDescendant() ?? '');
216+
if (inputBox.hasFocus()) {
217+
inputBox.setAttribute('aria-activedescendant', list.getActiveDescendant() ?? '');
218+
}
217219
}));
218220
this._register(list.onChangedAllVisibleChecked(checked => {
219221
checkAll.checked = checked;

0 commit comments

Comments
 (0)