Add alert for description when modal message is shown (#16483)

* Add alert for description when modal message is shown

* Fix hygiene
This commit is contained in:
Charles Gagnon
2021-07-30 15:02:20 -07:00
committed by GitHub
parent 87cc568493
commit 3362462142
3 changed files with 8 additions and 8 deletions

View File

@@ -582,6 +582,11 @@ export abstract class Modal extends Disposable implements IThemable {
}
DOM.removeNode(this._messageDetail!);
this.messagesElementVisible = !!this._messageSummaryText;
// Read out the description to screen readers so they don't have to
// search around for the alert box to hear the extra information
if (description) {
alert(description);
}
this.updateExpandMessageState();
}
}