fix(material/autocomplete): add missing aria-label for autocomplete panel - #20892
Conversation
crisbeto
left a comment
There was a problem hiding this comment.
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.
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.
@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.
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