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

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

@cai-feng

Description

@cai-feng

Adding aria-describedby to md-autocomplete like following code won't work.

<form name="projectForm">
  <md-autocomplete md-input-id="input-project-name"
                  md-input-name="projectName"
                  md-no-asterisk
                  md-floating-label="Project name"
                  md-items="item in $ctrl.projects"
                  md-item-text="item.name"
                  md-selected-item="$ctrl.project"
                  md-select-on-match="true"
                  md-autofocus
                  required
                  aria-describedby="project-name-description"
                  flex>
  <md-item-template>
      <span>
        {{item.name}}
      </span>
  </md-item-template>
  <div ng-messages="projectForm.projectName.$error"
        ng-if="projectForm.projectName.$touched">
    <div ng-message="required">
      Project name is required.
    </div>
  </div>
  <div id="project-name-description">
    Descriptive text
  </div>
  </md-autocomplete>
</form>

Metadata

Metadata

Assignees

Labels

P2: requiredIssues that must be fixed.a11yThis issue is related to accessibilityg3: reportedThe issue was reported by an internal or external product team.has: Pull RequestA PR has been created to address this issueresolution: fixedtype: enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions