Skip to content

Commit

Permalink
Update setTimeOut usage to the correct one and set the correct a11y r…
Browse files Browse the repository at this point in the history
…ole.
  • Loading branch information
joselrio committed Aug 31, 2023
1 parent f729390 commit d4a6786
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/scripts/OSFramework/OSUI/Constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ namespace OSFramework.OSUI.Constants {
},
Role: {
Alert: 'alert',
AlertDialog: 'alertdialog',
AttrName: 'role',
Button: 'button',
Complementary: 'complementary',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace OSFramework.OSUI.Patterns.Notification {
* @memberof Notification
*/
private _autoCloseNotification(): void {
setTimeout(() => {
Helper.ApplySetTimeOut(() => {
if (this._isOpen) {
this.hide();
}
Expand Down Expand Up @@ -313,7 +313,7 @@ namespace OSFramework.OSUI.Patterns.Notification {
Helper.Dom.Attribute.Set(
this.selfElement,
Constants.A11YAttributes.Role.AttrName,
Constants.A11YAttributes.Role.Alert
Constants.A11YAttributes.Role.AlertDialog
);

// Update accessibility properties
Expand Down

0 comments on commit d4a6786

Please sign in to comment.