Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

feat(autocomplete): add support for aria-describedby #11405

Merged
merged 1 commit into from
Aug 15, 2018

Conversation

Splaktar
Copy link
Contributor

PR Checklist

Please check that your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added or this is not a bug fix / enhancement
  • Docs have been added, updated, or were not required

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Enhancement
[ ] Documentation content changes
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

Applying aria-describedby to an md-autocomplete would not cause the attribute to be forwarded down to the native input element. Thus it would have no effect.

Issue Number:
Fixes #11004

What is the new behavior?

Applying aria-describedby to an md-autocomplete causes the attribute to be forwarded down to the native input element. This causes the contents of all elements with IDs in the list to be read after the autocomplete is selected and the label and state are announced.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@Splaktar Splaktar added type: enhancement a11y This issue is related to accessibility g3: reported The issue was reported by an internal or external product team. P2: required Issues that must be fixed. labels Aug 11, 2018
@Splaktar Splaktar added this to the 1.1.11 milestone Aug 11, 2018
@googlebot googlebot added the cla: yes PR author has signed Google's CLA: https://opensource.google.com/docs/cla/ label Aug 11, 2018
@Splaktar Splaktar added the pr: merge ready This PR is ready for a caretaker to review label Aug 12, 2018
@mmalerba
Copy link
Contributor

I'm seeing some accessibility test failures during presubmit:

Error: AX_ARIA_04 (ARIA state and property values must be valid) failed on the following element: #input-1

Error: AX_ARIA_02 (ARIA attributes which refer to other elements by ID should refer to elements which exist in the DOM) failed on the following element: #input-1

@Splaktar Splaktar force-pushed the autocompleteAriaDescribedBy branch from d3c5130 to 4ebcb27 Compare August 14, 2018 09:04
@Splaktar
Copy link
Contributor Author

@mmalerba OK, that was a good catch. We don't want to set aria-describedby="false" when the user didn't define the attribute. This is now fixed. Please re-submit.

@mmalerba
Copy link
Contributor

@Splaktar please rebase

@Splaktar Splaktar force-pushed the autocompleteAriaDescribedBy branch from 4ebcb27 to 5ec8117 Compare August 15, 2018 18:13
@Splaktar
Copy link
Contributor Author

@mmalerba rebased.

@mmalerba mmalerba merged commit a25a7df into master Aug 15, 2018
@Splaktar Splaktar deleted the autocompleteAriaDescribedBy branch August 15, 2018 18:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a11y This issue is related to accessibility cla: yes PR author has signed Google's CLA: https://opensource.google.com/docs/cla/ g3: reported The issue was reported by an internal or external product team. P2: required Issues that must be fixed. pr: merge ready This PR is ready for a caretaker to review type: enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(autocomplete): add support for aria-describedby
3 participants