A platform for community discussion. Free, open, simple.
FIX: aria label for popup-input-tip (#15724)
Krzysztof Kotlareka1adc13125c9
diff --git a/app/assets/javascripts/discourse/app/components/popup-input-tip.js b/app/assets/javascripts/discourse/app/components/popup-input-tip.jsindex 0ee73dbdc64..096e941bed3 100644--- a/app/assets/javascripts/discourse/app/components/popup-input-tip.js+++ b/app/assets/javascripts/discourse/app/components/popup-input-tip.js@@ -5,7 +5,7 @@ import { getOwner } from "discourse-common/lib/get-owner";export default Component.extend({classNameBindings: [":popup-tip", "good", "bad", "lastShownAt::hide"],- attributeBindings: ["role"],+ attributeBindings: ["role", "ariaLabel"],rerenderTriggers: ["validation.reason"],tipReason: null,lastShownAt: or("shownAt", "validation.lastShownAt"),@@ -19,6 +19,11 @@ export default Component.extend({}},+ @discourseComputed("validation.reason")+ ariaLabel(reason) {+ return reason?.replace(/(<([^>]+)>)/gi, "");+ },+click() {this.set("shownAt", null);const composer = getOwner(this).lookup("controller:composer");