Skip to content

Commit 234ed81

Browse files
committed
address comments
1 parent 66b88c2 commit 234ed81

File tree

5 files changed

+15
-38
lines changed

5 files changed

+15
-38
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ <h2>Mailbox navigation</h2>
2020
</section>
2121

2222
<section>
23-
<h2>Messages </h2>
23+
<h2>Messages</h2>
2424
<p>
2525
Showing a list of messages, where each message item has sender's name, sender's avatar,
2626
message subject, and content of the message.
@@ -37,7 +37,7 @@ <h3 md-line> {{message.from}} </h3>
3737
</section>
3838

3939
<section>
40-
<h2> Seasoning</h2>
40+
<h2>Seasoning</h2>
4141
<p>Showing a non-interactive list of seasonings with dense style.</p>
4242
<md-list dense>
4343
<md-list-item *ngFor="let item of items"> {{item}} </md-list-item>

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export class ListAccessibilityDemo {
1313
'Paprika'
1414
];
1515

16-
messages: any[] = [
16+
messages = [
1717
{
1818
from: 'Nancy',
1919
subject: 'Brunch?',
@@ -34,21 +34,21 @@ export class ListAccessibilityDemo {
3434
}
3535
];
3636

37-
links: any[] = [
37+
links = [
3838
{name: 'Inbox'},
3939
{name: 'Outbox'},
4040
{name: 'Spam'},
4141
{name: 'Trash'}
4242

4343
];
4444

45-
folders: any[] = [
45+
folders = [
4646
{name: 'Imported', updated: 'Miles'},
4747
{name: 'Important', updated: 'Tina'},
4848
{name: 'Unread', updated: 'Jeremy'},
4949
];
5050

51-
notes: any[] = [
51+
notes = [
5252
{name: 'Update screenshots', updated: 'Kara'},
5353
{name: 'Install new application', updated: 'Andrew'},
5454
];

src/lib/list/index.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ import {
1616
MdNavList,
1717
MdListAvatarCssMatStyler,
1818
MdListIconCssMatStyler,
19-
MdListCssMatStyler,
20-
MdNavListCssMatStyler,
2119
MdDividerCssMatStyler,
2220
MdListSubheaderCssMatStyler
2321
} from './list';
@@ -35,8 +33,6 @@ import {MdSelectionList, MdListOption} from './selection-list';
3533
MdLineModule,
3634
MdCommonModule,
3735
MdListIconCssMatStyler,
38-
MdListCssMatStyler,
39-
MdNavListCssMatStyler,
4036
MdDividerCssMatStyler,
4137
MdListSubheaderCssMatStyler,
4238
MdSelectionModule,
@@ -50,8 +46,6 @@ import {MdSelectionList, MdListOption} from './selection-list';
5046
MdNavList,
5147
MdListAvatarCssMatStyler,
5248
MdListIconCssMatStyler,
53-
MdListCssMatStyler,
54-
MdNavListCssMatStyler,
5549
MdDividerCssMatStyler,
5650
MdListSubheaderCssMatStyler,
5751
MdSelectionList,

src/lib/list/list.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,9 @@ To add a divider, use `<md-divider>`.
144144

145145
### Accessibility
146146
By default, the list assumes that it will be used in a purely decorative fashion and thus sets no
147-
roles, ARIA attributes, or keyboard shortcuts.
148-
This is equivalent to having a sequence of <div> elements on the page. Any interactive content
149-
within the grid-list should be given an appropriate accessibility treatment based on the specific
150-
workflow of your application.
147+
roles, ARIA attributes, or keyboard shortcuts. This is equivalent to having a sequence of <div>
148+
elements on the page. Any interactive content within the grid-list should be given an appropriate
149+
accessibility treatment based on the specific workflow of your application.
151150

152151
If the list is used to present a list of non-interactive content items, then the list element should
153-
be given `role="list"` and each tile should be given `role="listitem"`.
152+
be given `role="list"` and each tile should be given `role="listitem"`.

src/lib/list/list.ts

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ export class MdListDivider {}
4646
@Component({
4747
moduleId: module.id,
4848
selector: 'md-nav-list, mat-nav-list',
49-
host: {'role': 'navigation'},
49+
host: {
50+
'role': 'navigation',
51+
'class': 'mat-nav-list'
52+
},
5053
template: '<ng-content></ng-content>',
5154
styleUrls: ['list.css'],
5255
inputs: ['disableRipple'],
@@ -59,33 +62,14 @@ export class MdNavList extends _MdListMixinBase implements CanDisableRipple {}
5962
moduleId: module.id,
6063
selector: 'md-list, mat-list',
6164
template: '<ng-content></ng-content>',
65+
host: {'class': 'mat-list'},
6266
styleUrls: ['list.css'],
6367
inputs: ['disableRipple'],
6468
encapsulation: ViewEncapsulation.None,
6569
changeDetection: ChangeDetectionStrategy.OnPush,
6670
})
6771
export class MdList extends _MdListMixinBase implements CanDisableRipple {}
6872

69-
/**
70-
* Directive whose purpose is to add the mat- CSS styling to this selector.
71-
* @docs-private
72-
*/
73-
@Directive({
74-
selector: 'md-list, mat-list',
75-
host: {'class': 'mat-list'}
76-
})
77-
export class MdListCssMatStyler {}
78-
79-
/**
80-
* Directive whose purpose is to add the mat- CSS styling to this selector.
81-
* @docs-private
82-
*/
83-
@Directive({
84-
selector: 'md-nav-list, mat-nav-list',
85-
host: {'class': 'mat-nav-list'}
86-
})
87-
export class MdNavListCssMatStyler {}
88-
8973
/**
9074
* Directive whose purpose is to add the mat- CSS styling to this selector.
9175
* @docs-private

0 commit comments

Comments
 (0)