bug(SELECT): Aria-labelledby got empty space when no mat-label is defined and shows accessibility error in WAVE #22192
Labels
Accessibility
This issue is related to accessibility (a11y)
area: material/select
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Reproduction
Use StackBlitz to reproduce your issue:
Steps to reproduce:
in select
and in form-field
labelIed can be null so we end up with null + ' ' + ariaLabelledby or null
The only way to overcome this behavior is to provide our own aria-label
But that's more like a workaround.
Expected Behavior
No empty space before the concatenated parts of the string.
I think there should be null check before adding space infornt of the other string.
Actual Behavior
There is an empty space before the value of the attribute.
This breaks the accessibility tested with WAVE addon
Environment
Verfied that the same ource code logic exist in v11 so it must be valid for v11 aswell
The text was updated successfully, but these errors were encountered: