diff --git a/packages/main/src/DayPicker.ts b/packages/main/src/DayPicker.ts index ce3601eb03d3..19404d5df895 100644 --- a/packages/main/src/DayPicker.ts +++ b/packages/main/src/DayPicker.ts @@ -270,7 +270,7 @@ class DayPicker extends CalendarPart implements ICalendarPicker { classes: `ui5-dp-item ui5-dp-wday${dayOfTheWeek}`, ariaLabel, ariaSelected: String(isSelected || isSelectedBetween), - ariaDisabled: isOtherMonth ? "true" : undefined, + ariaDisabled: isDisabled || isOtherMonth ? "true" : undefined, disabled: isDisabled, type: specialDayType, }; diff --git a/packages/main/src/MonthPicker.hbs b/packages/main/src/MonthPicker.hbs index c1f30ceca756..875b98d4e2a6 100644 --- a/packages/main/src/MonthPicker.hbs +++ b/packages/main/src/MonthPicker.hbs @@ -19,6 +19,7 @@ class="{{this.classes}}" role="gridcell" aria-selected="{{this.ariaSelected}}" + aria-disabled="{{this.ariaDisabled}}" > {{this.name}} diff --git a/packages/main/src/MonthPicker.ts b/packages/main/src/MonthPicker.ts index acb8d9c71134..d425b8128195 100644 --- a/packages/main/src/MonthPicker.ts +++ b/packages/main/src/MonthPicker.ts @@ -47,6 +47,7 @@ type Month = { name: string, nameInSecType: string, disabled: boolean, + ariaDisabled: string | undefined, classes: string, } @@ -166,6 +167,7 @@ class MonthPicker extends CalendarPart implements ICalendarPicker { name: monthsNames[i], nameInSecType: this.hasSecondaryCalendarType && this._getDisplayedSecondaryMonthText(timestamp).text, disabled: isDisabled, + ariaDisabled: isDisabled ? "true" : undefined, classes: "ui5-mp-item", }; diff --git a/packages/main/src/YearPicker.hbs b/packages/main/src/YearPicker.hbs index c19822386fb0..74e693dc5cb6 100644 --- a/packages/main/src/YearPicker.hbs +++ b/packages/main/src/YearPicker.hbs @@ -18,6 +18,7 @@ class="{{this.classes}}" role="gridcell" aria-selected="{{this.ariaSelected}}" + aria-disabled="{{this.ariaDisabled}}" > {{this.year}} diff --git a/packages/main/src/YearPicker.ts b/packages/main/src/YearPicker.ts index ba5e45403524..9f933c9cef21 100644 --- a/packages/main/src/YearPicker.ts +++ b/packages/main/src/YearPicker.ts @@ -43,6 +43,7 @@ type Year = { year: string; yearInSecType: string | undefined; disabled: boolean; + ariaDisabled: string | undefined; classes: string; } @@ -176,6 +177,7 @@ class YearPicker extends CalendarPart implements ICalendarPicker { year: oYearFormat.format(tempDate.toLocalJSDate()), yearInSecType: textInSecType, disabled: isDisabled, + ariaDisabled: isDisabled ? "true" : undefined, classes: "ui5-yp-item", };