Skip to content

Commit

Permalink
fix(expansion-panel): remove invalid aria-expanded attribute set on h…
Browse files Browse the repository at this point in the history
…eader
  • Loading branch information
samrichardsontylertech committed Dec 12, 2023
1 parent 73824fd commit 3af53f9
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/lib/expansion-panel/expansion-panel-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ export class ExpansionPanelAdapter extends BaseAdapter<IExpansionPanelComponent>
openIconElement.open = true;
}
}

this._headerElement.setAttribute('aria-expanded', open ? 'true' : 'false');
}

public setHeaderVisibility(visible: boolean): void {
Expand Down Expand Up @@ -125,7 +123,6 @@ export class ExpansionPanelAdapter extends BaseAdapter<IExpansionPanelComponent>
this._contentElement.style.height = `${this._contentElement.scrollHeight}px`;
}
this._contentElement.style.opacity = '1';
this._headerElement.setAttribute('aria-expanded', 'true');
if (openIconElement) {
openIconElement.open = true;
}
Expand All @@ -136,7 +133,6 @@ export class ExpansionPanelAdapter extends BaseAdapter<IExpansionPanelComponent>
this._contentElement.style.height = '0px';
}
this._contentElement.style.opacity = '0';
this._headerElement.setAttribute('aria-expanded', 'false');
if (openIconElement) {
openIconElement.open = false;
}
Expand All @@ -158,7 +154,6 @@ export class ExpansionPanelAdapter extends BaseAdapter<IExpansionPanelComponent>
}
this._contentElement.style.removeProperty('visibility');
this._contentElement.style.removeProperty('opacity');
this._headerElement.setAttribute('aria-expanded', 'true');
if (openIconElement) {
openIconElement.open = true;
}
Expand All @@ -170,7 +165,6 @@ export class ExpansionPanelAdapter extends BaseAdapter<IExpansionPanelComponent>
}
this._contentElement.style.opacity = '0';
this._contentElement.style.visibility = 'hidden';
this._headerElement.setAttribute('aria-expanded', 'false');
if (openIconElement) {
openIconElement.open = false;
}
Expand Down

0 comments on commit 3af53f9

Please sign in to comment.