Skip to content

Commit 4ea4be7

Browse files
committed
Screen reader does not announce the expand state of select box
fixes microsoft#76869
1 parent 1f21bcd commit 4ea4be7

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/vs/base/browser/ui/selectBox/selectBoxCustom.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,7 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
464464
// Track initial selection the case user escape, blur
465465
this._currentSelection = this.selected;
466466
this._isVisible = true;
467+
this.selectElement.setAttribute('aria-expanded', 'true');
467468
}
468469

469470
private hideSelectDropDown(focusSelect: boolean) {
@@ -472,6 +473,7 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
472473
}
473474

474475
this._isVisible = false;
476+
this.selectElement.setAttribute('aria-expanded', 'false');
475477

476478
if (focusSelect) {
477479
this.selectElement.focus();

0 commit comments

Comments
 (0)