From 8f7c7cf482e832d8d59c43fb98316512656cde19 Mon Sep 17 00:00:00 2001
From: tinayuangao Showing a non-interactive list of seasonings. Seasoning
Messages
message subject, and content of the message.
{{message.subject}}
@@ -39,8 +39,8 @@Showing a non-interactive list of seasonings with dense style.
-Showing a list with two sections, "folders" and "notes".
{{folder.updated}}
{{note.updated}}
diff --git a/src/lib/list/list.spec.ts b/src/lib/list/list.spec.ts index b7644f7e247c..b76d5fa17e0d 100644 --- a/src/lib/list/list.spec.ts +++ b/src/lib/list/list.spec.ts @@ -115,8 +115,8 @@ describe('MatList', () => { let list = fixture.debugElement.children[0]; let listItem = fixture.debugElement.children[0].query(By.css('mat-list-item')); - expect(list.nativeElement.getAttribute('role')).toBeNull(); - expect(listItem.nativeElement.getAttribute('role')).toBe('listitem'); + expect(list.nativeElement.getAttribute('role')).toBeNull('Expect mat-list no role'); + expect(listItem.nativeElement.getAttribute('role')).toBeNull('Expect mat-list-item no role'); }); it('should not show ripples for non-nav lists', () => { diff --git a/src/lib/list/list.ts b/src/lib/list/list.ts index ab278121609d..621ab78cced6 100644 --- a/src/lib/list/list.ts +++ b/src/lib/list/list.ts @@ -119,7 +119,6 @@ export class MatListSubheaderCssMatStyler {} selector: 'mat-list-item, a[mat-list-item]', exportAs: 'matListItem', host: { - 'role': 'listitem', 'class': 'mat-list-item', '(focus)': '_handleFocus()', '(blur)': '_handleBlur()', diff --git a/src/material-examples/list-overview/list-overview-example.html b/src/material-examples/list-overview/list-overview-example.html index 9c416b76f0d3..c177f8712906 100644 --- a/src/material-examples/list-overview/list-overview-example.html +++ b/src/material-examples/list-overview/list-overview-example.html @@ -1,5 +1,5 @@