Skip to content

bug(mat-select): Accessibility scan showing Orphaned Form Label failure when correctly using the component #32735

@csirota97-a11y

Description

@csirota97-a11y

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

I am using 18.2.14; however, this issue also present on the https://material.angular.dev/components/select/overview page.

When using the WAVE accessibility scanner, we see that every mat-select present on the page flags an "Orphaned Form Label" accessibility failure.

Reproduction

REPL: https://material.angular.dev/components/select/examples
Steps to reproduce:

  1. Install the WAVE browser extenstion https://wave.webaim.org/extension/
  2. Navigate to: https://material.angular.dev/components/select/examples
  3. Right click on page and select "WAVE this page"
  4. Notice the "Orphaned Form Label" alerts on all mat-select

*Note - I tried to upload a screenshot, but the file upload seems to be failing for some reason

Image

Expected Behavior

Labels should be correctly programatically associated to the form elements so that the WAVE scan does not flag any correctly used mat-select components as "Orphaned Form Label"

Actual Behavior

Labels are incorrectly associated to the form elements so that the WAVE scan is flagging correctly used mat-select components as "Orphaned Form Label"

Environment

  • Angular: 18.2.12
  • CDK/Material: 18.2.14-21.1.2
  • Browser(s): Edge, Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): macOS Sequoia, Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageThis issue needs to be triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions