Update aria label for modal dialog when title is updated (#9492)

This commit is contained in:
Charles Gagnon
2020-03-09 08:25:04 -07:00
committed by GitHub
parent 86b92b9a87
commit 964ff0119e

View File

@@ -528,9 +528,13 @@ export abstract class Modal extends Disposable implements IThemable {
* Set the title of the modal * Set the title of the modal
*/ */
protected set title(title: string) { protected set title(title: string) {
if (this._title !== undefined) { this._title = title;
if (this._modalTitle) {
this._modalTitle.innerText = title; this._modalTitle.innerText = title;
} }
if (this._bodyContainer) {
this._bodyContainer.setAttribute('aria-label', title);
}
} }
protected get title(): string { protected get title(): string {