Skip to content

Commit 8dd8ba4

Browse files
committed
change header and add roles
1 parent 7864677 commit 8dd8ba4

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

src/demo-app/a11y/grid-list/grid-list-a11y.html

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
11
<section>
2-
<h2>Fixed-height grid list</h2>
3-
<md-grid-list [cols]="fixedCols" [rowHeight]="fixedRowHeight">
2+
<h2>Types of coffee (fix-height grid-list)</h2>
3+
<md-grid-list role="list" [cols]="fixedCols" [rowHeight]="fixedRowHeight">
44
<md-grid-tile *ngFor="let tile of tiles" [colspan]="tile.cols" [rowspan]="tile.rows"
5-
[style.background]="tile.color">
5+
[style.background]="tile.color" role="listitem">
66
{{tile.text}}
77
</md-grid-tile>
88
</md-grid-list>
99
</section>
1010

1111
<section>
12-
<h2>Ratio-height grid list</h2>
13-
<md-grid-list cols="2" [rowHeight]="ratio" gutterSize="4px">
14-
<md-grid-tile *ngFor="let tile of tiles" [style.background]="'lightblue'">
12+
<h2>Types of coffee (ratio-height grid list)</h2>
13+
<md-grid-list role="list" cols="2" [rowHeight]="ratio" gutterSize="4px">
14+
<md-grid-tile *ngFor="let tile of tiles" [style.background]="'lightblue'" role="listitem">
1515
{{tile.text}}
1616
</md-grid-tile>
1717
</md-grid-list>
1818
</section>
1919

2020
<section>
21-
<h2>Fit-height grid list</h2>
22-
<md-grid-list cols="2" rowHeight="fit" [gutterSize]="ratioGutter"
21+
<h2>Types of coffee (fit-height grid list)</h2>
22+
<md-grid-list role="list" cols="2" rowHeight="fit" [gutterSize]="ratioGutter"
2323
[style.height]="fitListHeight">
24-
<md-grid-tile *ngFor="let tile of tiles" [style.background]="'#F1EBBA'">
24+
<md-grid-tile *ngFor="let tile of tiles" role="listitem" [style.background]="'#F1EBBA'">
2525
{{tile.text}}
2626
</md-grid-tile>
2727
</md-grid-list>
2828
</section>
2929

3030
<section>
31-
<h2>Grid list with header and footer</h2>
32-
<md-grid-list cols="3" rowHeight="200px">
33-
<md-grid-tile *ngFor="let dog of dogs">
31+
<h2>Angular team dogs (Grid list with header and footer)</h2>
32+
<md-grid-list role="list" cols="3" rowHeight="200px">
33+
<md-grid-tile *ngFor="let dog of dogs" role="listitem">
3434
<md-grid-tile-header>{{dog.name}}</md-grid-tile-header>
35-
<img alt="Photo of {{dog.name}}" src="https://material.angularjs.org/material2_assets/ngconf/{{dog.name}}.png">
35+
<img alt="Photo of {{dog.name}}"
36+
src="https://material.angularjs.org/material2_assets/ngconf/{{dog.name}}.png">
3637
<md-grid-tile-footer>
3738
<span md-line>Human: {{dog.human}}</span>
38-
<md-icon>star_border</md-icon>
3939
</md-grid-tile-footer>
4040
</md-grid-tile>
4141
</md-grid-list>

src/demo-app/a11y/grid-list/grid-list-a11y.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import {Component} from '@angular/core';
22

3-
interface Dog {
3+
export interface Dog {
44
name: string;
55
human: string;
66
}
7+
78
@Component({
89
moduleId: module.id,
910
selector: 'grid-list-a11y',

0 commit comments

Comments
 (0)