Skip to content

Commit

Permalink
feat(gv-select): improve with design pattern listbox
Browse files Browse the repository at this point in the history
  • Loading branch information
gcusnieux committed Nov 6, 2021
1 parent ce95eea commit 06d4eb9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/atoms/gv-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ export class GvSelect extends withResizeObserver(InputElement(LitElement)) {
</div>
${this.readonly
? ''
: html` <ul class="${classMap(Object.assign({ select__list: true }))}">
: html` <ul class="${classMap(Object.assign({ select__list: true }))}" role="listbox" ?aria-expanded="${!this._isClosed}">
${this._options &&
repeat(
this._options,
Expand All @@ -429,6 +429,8 @@ export class GvSelect extends withResizeObserver(InputElement(LitElement)) {
@click=${this._onSelect.bind(this, option)}
data-value="${option.value}"
.title="${ifDefined(option.title)}"
role="option"
?aria-selected="${this.isSelected(option)}"
>
${option.label}
</li>
Expand Down

0 comments on commit 06d4eb9

Please sign in to comment.