Merge "A11y - improve announcing"
diff --git a/polygerrit-ui/app/elements/core/gr-error-manager/gr-error-manager.ts b/polygerrit-ui/app/elements/core/gr-error-manager/gr-error-manager.ts
index 4f3d7ce6..e4e4056 100644
--- a/polygerrit-ui/app/elements/core/gr-error-manager/gr-error-manager.ts
+++ b/polygerrit-ui/app/elements/core/gr-error-manager/gr-error-manager.ts
@@ -336,7 +336,7 @@
const el = this._createToastAlert();
el.show(text, actionText, actionCallback);
this._alertElement = el;
- this.fire('iron-announce', {text}, {bubbles: true});
+ this.fire('iron-announce', {text: `Alert: ${text}`}, {bubbles: true});
this.reporting.reportInteraction('show-alert', {text});
}
diff --git a/polygerrit-ui/app/elements/gr-app-element.ts b/polygerrit-ui/app/elements/gr-app-element.ts
index 2915acd..617034b 100644
--- a/polygerrit-ui/app/elements/gr-app-element.ts
+++ b/polygerrit-ui/app/elements/gr-app-element.ts
@@ -492,6 +492,9 @@
registrationOverlay.refit();
});
}
+ // To fix bug announce read after each new view, we reset announce with
+ // empty space
+ this.fire('iron-announce', {text: ' '}, {bubbles: true});
}
_handleShortcutTriggered(event: ShortcutTriggeredEvent) {