Skip to content

Commit b4fafda

Browse files
authored
fix(material/grid-list): remove internal figure element (#21826)
Removes the built-in `figure` element inside the grid tile since it isn't always desirable from an accessibility perspective. Fixes #21775.
1 parent e6578d9 commit b4fafda

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

src/material/grid-list/grid-list.scss

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,6 @@ $text-padding: 16px;
1919
position: absolute;
2020
overflow: hidden;
2121

22-
.mat-figure {
23-
@include layout-common.fill;
24-
display: flex;
25-
26-
align-items: center;
27-
justify-content: center;
28-
height: 100%;
29-
30-
padding: 0;
31-
margin: 0;
32-
}
33-
3422
// Headers & footers
3523
.mat-grid-tile-header,
3624
.mat-grid-tile-footer {
@@ -79,3 +67,15 @@ $text-padding: 16px;
7967
}
8068
}
8169
}
70+
71+
.mat-grid-tile-content {
72+
@include layout-common.fill;
73+
display: flex;
74+
75+
align-items: center;
76+
justify-content: center;
77+
height: 100%;
78+
79+
padding: 0;
80+
margin: 0;
81+
}

src/material/grid-list/grid-tile.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- TODO(kara): Revisit why this is a figure.-->
2-
<figure class="mat-figure">
1+
<!-- The `mat-figure` class is only used for backwards compatibility. -->
2+
<div class="mat-grid-tile-content mat-figure">
33
<ng-content></ng-content>
4-
</figure>
4+
</div>

0 commit comments

Comments
 (0)