Skip to content

Commit

Permalink
fix(material/button): stack icons on top of touch target (angular#29291)
Browse files Browse the repository at this point in the history
Some time ago we started stacking the button's text on top of the ripple and touch target for accessibility reasons, but we didn't apply the same to icons.

Fixes angular#28888.
  • Loading branch information
crisbeto authored and DBowen33 committed Jul 3, 2024
1 parent b2bd055 commit 354486e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/material/button/_button-base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@

// The content should appear over the state and ripple layers, otherwise they may adversely affect
// the accessibility of the text content.
.mdc-button__label {
.mdc-button__label,
.mat-icon {
z-index: 1;
position: relative;
}

// The focus indicator should match the bounds of the entire button.
Expand Down

0 comments on commit 354486e

Please sign in to comment.