File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 42
42
[style.paddingTop] ="_cellPadding "
43
43
[style.paddingBottom] ="_cellPadding ">
44
44
< button class ="mat-calendar-body-cell-content "
45
- mat-button
45
+ mat-button type ="button "
46
+ [attr.aria-label] ="item.displayValue "
46
47
[class.mat-calendar-body-selected] ="selectedValue === item.value "
47
48
[class.mat-calendar-body-today] ="todayValue === item.value ">
48
49
{{item.displayValue}}
Original file line number Diff line number Diff line change @@ -70,15 +70,19 @@ describe('MatCalendar', () => {
70
70
71
71
let todayCell = calendarElement . querySelector ( '.mat-calendar-body-today' ) ! ;
72
72
expect ( todayCell ) . not . toBeNull ( ) ;
73
- expect ( todayCell . innerHTML . trim ( ) ) . toBe ( '1' ) ;
73
+ let todayCellSpan = todayCell . querySelector ( 'span' ) ! ;
74
+ expect ( todayCellSpan ) . not . toBeNull ( ) ;
75
+ expect ( todayCellSpan . innerHTML . trim ( ) ) . toBe ( '1' ) ;
74
76
75
77
fakeToday = new Date ( 2018 , 0 , 10 ) ;
76
78
calendarInstance . updateTodaysDate ( ) ;
77
79
fixture . detectChanges ( ) ;
78
80
79
81
todayCell = calendarElement . querySelector ( '.mat-calendar-body-today' ) ! ;
80
82
expect ( todayCell ) . not . toBeNull ( ) ;
81
- expect ( todayCell . innerHTML . trim ( ) ) . toBe ( '10' ) ;
83
+ todayCellSpan = todayCell . querySelector ( 'span' ) ! ;
84
+ expect ( todayCellSpan ) . not . toBeNull ( ) ;
85
+ expect ( todayCellSpan . innerHTML . trim ( ) ) . toBe ( '10' ) ;
82
86
} ) ) ;
83
87
84
88
it ( 'should be in month view with specified month active' , ( ) => {
You can’t perform that action at this time.
0 commit comments