Skip to content

Commit

Permalink
fix(material/button): stack icons on top of touch target (#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 #28888.
  • Loading branch information
crisbeto authored Jun 25, 2024
1 parent e74065a commit f67ffa5
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 f67ffa5

Please sign in to comment.