Skip to content
This repository was archived by the owner on May 20, 2023. It is now read-only.

Commit fcccfc7

Browse files
phantomessenshahan
authored andcommitted
Add support for <h1> as the title in material dialog in addition to <h3>.
We should only use <h1> as the title from now on according to the Google Accessibility Rating (GAR). PiperOrigin-RevId: 187081199
1 parent 84cd1c2 commit fcccfc7

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

lib/material_dialog/_mixins.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
padding: $mat-grid * 3 $mat-grid * 3 0;
5656
width: 100%;
5757

58+
::ng-deep h1,
5859
::ng-deep h3 {
5960
@include mat-type-title;
6061
margin: 0 0 $mat-grid;
@@ -71,6 +72,7 @@
7172
background: $mat-gray-700;
7273
padding-bottom: $mat-grid * 2;
7374

75+
::ng-deep h1,
7476
::ng-deep h3 {
7577
color: $mat-white;
7678
margin-bottom: $mat-grid / 2;

lib/material_dialog/material_dialog.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import 'package:angular_components/utils/disposer/disposer.dart';
3030
/// <modal [visible]="showDialog">
3131
/// <material-dialog>
3232
/// <div header>
33-
/// <h3>Title</h3>
33+
/// <h1>Title</h1>
3434
/// <p>Subtitle</p>
3535
/// </div>
3636
///
@@ -52,7 +52,7 @@ import 'package:angular_components/utils/disposer/disposer.dart';
5252
/// <modal [visible]="showDialog">
5353
/// <material-dialog headered>
5454
/// <div header>
55-
/// <h3>Title</h3>
55+
/// <h1>Title</h1>
5656
/// <p>Subtitle</p>
5757
/// </div>
5858
///
@@ -80,7 +80,7 @@ import 'package:angular_components/utils/disposer/disposer.dart';
8080
/// <glyph icon="close"></glyph>
8181
/// </material-button>
8282
///
83-
/// <h3>Title</h3>
83+
/// <h1>Title</h1>
8484
/// </div>
8585
///
8686
/// <p>Content goes here.</p>

lib/material_dialog/material_dialog.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ footer {
9797

9898
:host[info] ::ng-deep .wrapper {
9999
> header {
100+
::ng-deep h1,
100101
::ng-deep h3 {
101102
line-height: $mat-grid * 5;
102103
margin: 0;

0 commit comments

Comments
 (0)