Skip to content

Commit 020572a

Browse files
committed
fix(material/sort): clear aria description on destroy
Fixes that the sort header wasn't clearing its ARIA description when it gets destroyed, causing a memory leak.
1 parent 46db6a6 commit 020572a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/material/sort/sort-header.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ export class MatSortHeader implements MatSortable, OnDestroy, OnInit, AfterViewI
229229
ngOnDestroy() {
230230
this._focusMonitor.stopMonitoring(this._elementRef);
231231
this._sort.deregister(this);
232+
this._ariaDescriber?.removeDescription(this._sortButton, this._sortActionDescription);
232233
this._rerenderSubscription.unsubscribe();
233234
}
234235

0 commit comments

Comments
 (0)