Skip to content

fix(material/list): fix wcag missing form label #29601

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

grabowskidaniel
Copy link

Add labelId input to the Angular Material list component to avoid missing form label error
Fixes angular/material.angular.io#1221

Add labelId input to the Angular Material `list` component to avoid missing form label error
@grabowskidaniel grabowskidaniel requested a review from a team as a code owner August 17, 2024 16:53
@grabowskidaniel grabowskidaniel requested review from crisbeto and amysorto and removed request for a team August 17, 2024 16:53
class="mdc-checkbox__native-control"
[checked]="selected"
[disabled]="disabled"
[attr.aria-labelledby]="labelId"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This input doesn't need to be labelled, because it's display: none so it's completely removed from the accessibility tree. See https://github.com/angular/components/blob/main/src/material/list/list-option.scss#L76

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Oct 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Getting missing Form label for mat-list-option for angular material 15 after MDC migration
2 participants