From 3af53f9ea266fd993352378ff1c713fa5c3c583d Mon Sep 17 00:00:00 2001 From: Sam Richardson Date: Tue, 12 Dec 2023 10:09:57 -0500 Subject: [PATCH 1/3] fix(expansion-panel): remove invalid aria-expanded attribute set on header --- src/lib/expansion-panel/expansion-panel-adapter.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/lib/expansion-panel/expansion-panel-adapter.ts b/src/lib/expansion-panel/expansion-panel-adapter.ts index c6377fb9e..189e29009 100644 --- a/src/lib/expansion-panel/expansion-panel-adapter.ts +++ b/src/lib/expansion-panel/expansion-panel-adapter.ts @@ -51,8 +51,6 @@ export class ExpansionPanelAdapter extends BaseAdapter openIconElement.open = true; } } - - this._headerElement.setAttribute('aria-expanded', open ? 'true' : 'false'); } public setHeaderVisibility(visible: boolean): void { @@ -125,7 +123,6 @@ export class ExpansionPanelAdapter extends BaseAdapter this._contentElement.style.height = `${this._contentElement.scrollHeight}px`; } this._contentElement.style.opacity = '1'; - this._headerElement.setAttribute('aria-expanded', 'true'); if (openIconElement) { openIconElement.open = true; } @@ -136,7 +133,6 @@ export class ExpansionPanelAdapter extends BaseAdapter this._contentElement.style.height = '0px'; } this._contentElement.style.opacity = '0'; - this._headerElement.setAttribute('aria-expanded', 'false'); if (openIconElement) { openIconElement.open = false; } @@ -158,7 +154,6 @@ export class ExpansionPanelAdapter extends BaseAdapter } this._contentElement.style.removeProperty('visibility'); this._contentElement.style.removeProperty('opacity'); - this._headerElement.setAttribute('aria-expanded', 'true'); if (openIconElement) { openIconElement.open = true; } @@ -170,7 +165,6 @@ export class ExpansionPanelAdapter extends BaseAdapter } this._contentElement.style.opacity = '0'; this._contentElement.style.visibility = 'hidden'; - this._headerElement.setAttribute('aria-expanded', 'false'); if (openIconElement) { openIconElement.open = false; } From fc4167b90311e78a1b3512c6b8894ddee28e7783 Mon Sep 17 00:00:00 2001 From: "Nichols, Kieran" Date: Thu, 14 Dec 2023 09:29:07 -0500 Subject: [PATCH 2/3] chore(calendar): fix broken test when using min date --- src/lib/calendar/calendar-foundation.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/calendar/calendar-foundation.ts b/src/lib/calendar/calendar-foundation.ts index 372e8d351..91f476560 100644 --- a/src/lib/calendar/calendar-foundation.ts +++ b/src/lib/calendar/calendar-foundation.ts @@ -1605,7 +1605,8 @@ export class CalendarFoundation implements ICalendarFoundation { private _applyMin(): void { this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.MIN, !!this._minAttribute, this._minAttribute as string); - if (this._min && this._min.getMonth() > this._month) { + if (this._min && (this._min.getMonth() > this._month || this._min.getFullYear() > this._year)) { + this._year = this._min.getFullYear(); this._month = this._min.getMonth(); } From fd6a4e37778c8e933d49d25b71a70d2f46a62993 Mon Sep 17 00:00:00 2001 From: "Nichols, Kieran" Date: Thu, 14 Dec 2023 09:40:45 -0500 Subject: [PATCH 3/3] chore: fix test assertion --- src/test/spec/date-picker/date-picker.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/spec/date-picker/date-picker.spec.ts b/src/test/spec/date-picker/date-picker.spec.ts index b27a01cba..0b4e170c6 100644 --- a/src/test/spec/date-picker/date-picker.spec.ts +++ b/src/test/spec/date-picker/date-picker.spec.ts @@ -86,7 +86,8 @@ describe('DatePickerComponent', function(this: ITestContext) { openPopup(this.context.component); const calendar = getCalendar(this.context.component); - expect(calendar.month).toEqual(date.getMonth() + 1); + const expectedMonth = date.getMonth() >= 11 ? 0 : date.getMonth() + 1; + expect(calendar.month).toEqual(expectedMonth); }); it('should open calendar in month of max date if max is before current month', function(this: ITestContext) {