-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(material/autocomplete): add missing aria-label for autocomplete panel #20892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
crisbeto
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll also have to apply the same fix to the MDC-based autocomplete and write a unit test or two to verify the fix.
e68c30a to
dea2122
Compare
|
dea2122 to
2d4bc9e
Compare
1f26c2f to
19dfec2
Compare
|
Addressed comments. |
crisbeto
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM once the CI failure has been fixed.
|
I think the CI failure is a previous commit message error |
|
|
||
| this.autocomplete._setVisibility(); | ||
| this.autocomplete._isOpen = this._overlayAttached = true; | ||
| this.autocomplete._formFieldLabelId = this._formField?._labelId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@crisbeto we're seeing this cause a ChangedAfterChecked error in Google because change detection runs for the first time during the attach call above, but then this changes _formFieldLabelId (and thus the `aria-labelledby expression) in the check pass. I can think of a couple hacky ways to work around this, but nothing super clean. Any ideas?
| <ng-template> | ||
| <div class="mat-autocomplete-panel" role="listbox" [id]="id" [ngClass]="_classList" #panel> | ||
| <div class="mat-autocomplete-panel" | ||
| role="listbox" [id]="id" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can this get split into 2 lines? 😄
19dfec2 to
5d1bf98
Compare
5d1bf98 to
1371e31
Compare
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes #20888