Skip to content

Commit

Permalink
fix(select): missing accessible label
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 686083729
  • Loading branch information
asyncLiz authored and copybara-github committed Oct 15, 2024
1 parent c27bdee commit 1bdcbd3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion select/internal/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,14 +386,15 @@ export abstract class Select extends selectBaseClass {
}

private renderField() {
const ariaLabel = (this as ARIAMixinStrict).ariaLabel || this.label;
return staticHtml`
<${this.fieldTag}
aria-haspopup="listbox"
role="combobox"
part="field"
id="field"
tabindex=${this.disabled ? '-1' : '0'}
aria-label=${(this as ARIAMixinStrict).ariaLabel || nothing}
aria-label=${ariaLabel || nothing}
aria-describedby="description"
aria-expanded=${this.open ? 'true' : 'false'}
aria-controls="listbox"
Expand Down

0 comments on commit 1bdcbd3

Please sign in to comment.