-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
feat(badge): Badge should warn when used on an aria-hidden
mat-icon
#27035
Labels
area: material/badge
feature
This issue represents a new feature or feature request rather than a bug or bug fix
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Comments
jelbourn
added
feature
This issue represents a new feature or feature request rather than a bug or bug fix
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
area: material/badge
labels
May 4, 2023
naaajii
added a commit
to naaajii/components
that referenced
this issue
May 15, 2023
prior this commit there was no warning for matBadge being used with matIcon which means badge content is not visible to screen readers Closes angular#27035
naaajii
added a commit
to naaajii/components
that referenced
this issue
Jun 26, 2023
prior this commit there was no warning for matBadge being use with <mat-icon> as it is aria-hidden by default which means badge content is invisible to screen readers fixes angular#27035
naaajii
added a commit
to naaajii/components
that referenced
this issue
Jun 27, 2023
prior this commit there was no warning for matBadge being use with <mat-icon> as it is aria-hidden by default which means badge content is invisible to screen readers fixes angular#27035
crisbeto
pushed a commit
that referenced
this issue
Jun 28, 2023
* fix(material/badge): warn if use with mat-icon prior this commit there was no warning for matBadge being use with <mat-icon> as it is aria-hidden by default which means badge content is invisible to screen readers fixes #27035 * fixup! fix(material/badge): warn if use with mat-icon
crisbeto
pushed a commit
that referenced
this issue
Jun 28, 2023
* fix(material/badge): warn if use with mat-icon prior this commit there was no warning for matBadge being use with <mat-icon> as it is aria-hidden by default which means badge content is invisible to screen readers fixes #27035 * fixup! fix(material/badge): warn if use with mat-icon (cherry picked from commit 65c7cad)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
stephenrca
pushed a commit
to stephenrca/components
that referenced
this issue
Aug 2, 2023
* fix(material/badge): warn if use with mat-icon prior this commit there was no warning for matBadge being use with <mat-icon> as it is aria-hidden by default which means badge content is invisible to screen readers fixes angular#27035 * fixup! fix(material/badge): warn if use with mat-icon
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area: material/badge
feature
This issue represents a new feature or feature request rather than a bug or bug fix
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Feature Description
From usages across Google, we've seen that's it's common for devs to put
matBadge
on<mat-icon>
. The problem is that<mat-icon>
isaria-hidden
by default, meaning that the badge content is also invisible to screen readers. Our documentation already calls this out as a misuse of the badge, but we can go a step further and actually produce a console warning. This would look something roughly likeThe text was updated successfully, but these errors were encountered: