mirror of
https://github.com/material-components/material-web.git
synced 2026-01-09 07:21:09 +08:00
fix(select): missing accessible label
PiperOrigin-RevId: 686083729
This commit is contained in:
parent
c27bdee027
commit
1bdcbd38ab
@ -386,6 +386,7 @@ export abstract class Select extends selectBaseClass {
|
||||
}
|
||||
|
||||
private renderField() {
|
||||
const ariaLabel = (this as ARIAMixinStrict).ariaLabel || this.label;
|
||||
return staticHtml`
|
||||
<${this.fieldTag}
|
||||
aria-haspopup="listbox"
|
||||
@ -393,7 +394,7 @@ export abstract class Select extends selectBaseClass {
|
||||
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"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user