Skip to content

Commit 744291a

Browse files
author
MPopov
committed
Adding ngIf to the off-screen element and remove the aria-hidden from the directive
1 parent 6da262d commit 744291a

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

projects/igniteui-angular/src/lib/calendar/calendar.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
</ng-template>
55

66
<ng-template let-result #defaultMonth let-obj>
7-
<span class="igx-calendar__aria-off-screen" aria-live="polite">
8-
{{ monthsViewNumber > 1 ? (resourceStrings.igx_calendar_first_picker_of.replace('{0}', monthsViewNumber.toString()) + ' ' + (getViewDate(obj.index) | date: 'LLLL yyyy')) : resourceStrings.igx_calendar_selected_month_is + (getViewDate(obj.index) | date: 'LLLL yyyy')}}
7+
<span *ngIf="monthsViewNumber < 2 || obj.index < 1" class="igx-calendar__aria-off-screen" aria-live="polite">
8+
{{ monthsViewNumber > 1 ? (resourceStrings.igx_calendar_first_picker_of.replace('{0}', monthsViewNumber.toString()) + ' ' + (getViewDate(obj.index) | date: 'LLLL yyyy')) : resourceStrings.igx_calendar_selected_month_is + (getViewDate(obj.index) | date: 'LLLL yyyy')}}
99
</span>
1010
<span
1111
tabindex="0"

projects/igniteui-angular/src/lib/calendar/calendar.directives.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,6 @@ export class IgxCalendarYearDirective {
5353
return this.isCurrentYear ? 'spinbutton' : null;
5454
}
5555

56-
@HostBinding('attr.arria-hidden')
57-
public get aHidden(): boolean {
58-
return !this.isCurrentYear;
59-
}
60-
6156
@HostBinding('attr.aria-valuenow')
6257
public get valuenow(): number {
6358
return this.isCurrentYear ? this.date.getFullYear() : null;

projects/igniteui-angular/src/lib/calendar/years-view/years-view.component.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<div class="igx-calendar__body">
22
<div class="igx-calendar__body-column" (wheel)="scroll($event)" (pan)="pan($event)">
33
<span
4-
[attr.aria-label]="formattedYear(year)"
54
[igxCalendarYear]="year"
65
[date]="date"
76
(onYearSelection)="selectYear($event)"

0 commit comments

Comments
 (0)