Skip to content

Commit

Permalink
fix(material/button): stack icons on top of touch target
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 committed Jun 20, 2024
1 parent b5e3015 commit 1c22f78
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 1c22f78

Please sign in to comment.