Skip to content

Commit aadcf0a

Browse files
committed
feat(IgxYearsView): add tabIndex to years view elements #6275
1 parent 9c93344 commit aadcf0a

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Diff for: projects/igniteui-angular/src/lib/calendar/calendar.directives.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ export class IgxCalendarYearDirective {
4848
return this.isCurrentYear;
4949
}
5050

51+
@HostBinding('attr.tabindex')
52+
public get tabIndex(): number {
53+
return this.isCurrentYear ? 0 : -1;
54+
}
55+
56+
5157
public get isCurrentYear(): boolean {
5258
return this.date.getFullYear() === this.value.getFullYear();
5359
}
@@ -75,9 +81,6 @@ export class IgxCalendarMonthDirective {
7581
@Output()
7682
public onMonthSelection = new EventEmitter<Date>();
7783

78-
@HostBinding('attr.tabindex')
79-
public tabindex = 0;
80-
8184
@HostBinding('class.igx-calendar__month')
8285
public get defaultCSS(): boolean {
8386
return !this.isCurrentMonth;

Diff for: projects/igniteui-angular/src/lib/calendar/years-view/years-view.component.ts

+1
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ export class IgxYearsViewComponent implements ControlValueAccessor {
139139
*
140140
* @hidden
141141
*/
142+
@Input()
142143
@HostBinding('attr.tabindex')
143144
public tabindex = 0;
144145

0 commit comments

Comments
 (0)