-
Notifications
You must be signed in to change notification settings - Fork 3.4k
feat(autocomplete): add input-aria-label and input-aria-labelledby #11412
Conversation
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
@jelbourn I am actually going to change this once more after doing some further testing on a larger chips a11y PR. I think that applying I'll send over the chips PR for your initial review later today. |
f4cc640
to
66d31ed
Compare
@jelbourn OK, this PR is updated. It also adds an This PR also updates It's possible that this could solve the a11y error that was seen by Miles' presubmit. However, the changes were made for general correctness after doing some additional screen reader testing with chips. It's still possible to apply an |
Feedback on presubmit failures: This PR "is failing an accessibility check in one project where an element that formerly had a label now doesn't. Need to check that the change isn't overwriting an aria-label with nothing." I'll try to reproduce this in a unit test.
|
66d31ed
to
7c09bd9
Compare
I'm seeing a couple of these errors:
|
@mmalerba I'll need more detailed information. As mentioned above, I've written up a lot of test cases for this. Please let me know the use case that is failing so that I can add another unit test that covers it. |
Bumped this to P1 as getting this in is blocking some work on P1 issues. |
7c09bd9
to
de4d43c
Compare
Rebased. |
de4d43c
to
8b32f18
Compare
Rebased ✅ |
don't apply a duplicate aria-label and aria-labelledby to the same input change aria-describedby to input-aria-describedby Fixes #10815
8b32f18
to
3fdafd0
Compare
Rebased ✔️ |
PR Checklist
Please check that your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
applying
aria-labelledby
tomd-autocomplete
has no effect because the attribute is not forwarded on to theinput
.Issue Number:
Fixes #10815
What is the new behavior?
add support for
input-aria-label
andinput-aria-labelledby
which will apply those values to theinput
element of the autocomplete.Does this PR introduce a breaking change?
Other information
It looks like the previous PR #11407 had a problem with https://github.com/GoogleChrome/accessibility-developer-tools/wiki/Audit-Rules#ax_text_01: