Skip to content
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

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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