File tree Expand file tree Collapse file tree
src/includes/vscode-select Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -623,7 +623,7 @@ export class VscodeSelectBase extends VscElement {
623623
624624 return html `
625625 < ul
626- aria-label =" List of options "
626+ aria-label =${ ifDefined ( this . label ?? undefined ) }
627627 class ="options"
628628 id="select-listbox"
629629 role="listbox"
@@ -668,6 +668,7 @@ export class VscodeSelectBase extends VscElement {
668668 data-filtered-index=${ index }
669669 id=${ `op-${ op . index } ` }
670670 role="option"
671+ tabindex="-1"
671672 >
672673 ${ this . _multiple
673674 ? html `< span class =${ classMap ( checkboxClasses ) } > </ span
@@ -758,17 +759,22 @@ export class VscodeSelectBase extends VscElement {
758759
759760 const activeDescendant =
760761 this . _opts . activeIndex > - 1 ? `op-${ this . _opts . activeIndex } ` : '' ;
762+ const expanded = this . open ? 'true' : 'false' ;
761763
762764 return html `
763765 < div class ="combobox-face face ">
764766 ${ this . _multiple ? this . _renderMultiSelectLabel ( ) : nothing }
765767 < input
766- aria-activedescendant =${ activeDescendant }
768+ aria-activedescendant =${ ifDefined (
769+ this . _opts . multiSelect ? undefined : activeDescendant
770+ ) }
767771 aria-autocomplete ="list"
768772 aria-controls=${ this . _multiple
769773 ? 'multi-select-listbox'
770774 : 'single-select-listbox' }
771- aria-expanded=${ this . open ? 'true' : 'false' }
775+ aria-expanded=${ ifDefined (
776+ this . _opts . multiSelect ? undefined : expanded
777+ ) }
772778 aria-haspopup="listbox"
773779 aria-label=${ ifDefined ( this . label ) }
774780 class="combobox-input"
You can’t perform that action at this time.
0 commit comments