FIX: Use title attribute for notification items. (#7840)

FIX: Use title attribute for notification items. (#7840)

diff --git a/app/assets/javascripts/discourse/widgets/custom-notification-item.js.es6 b/app/assets/javascripts/discourse/widgets/custom-notification-item.js.es6
index 8ebff66..ec567b5 100644
--- a/app/assets/javascripts/discourse/widgets/custom-notification-item.js.es6
+++ b/app/assets/javascripts/discourse/widgets/custom-notification-item.js.es6
@@ -4,7 +4,7 @@ import { formatUsername } from "discourse/lib/utilities";
 import { iconNode } from "discourse-common/lib/icon-library";
 
 createWidgetFrom(DefaultNotificationItem, "custom-notification-item", {
-  title(notificationName, data) {
+  notificationTitle(notificationName, data) {
     return data.title ? I18n.t(data.title) : "";
   },
 
diff --git a/app/assets/javascripts/discourse/widgets/default-notification-item.js.es6 b/app/assets/javascripts/discourse/widgets/default-notification-item.js.es6
index 610ac1f..afbdbb5 100644
--- a/app/assets/javascripts/discourse/widgets/default-notification-item.js.es6
+++ b/app/assets/javascripts/discourse/widgets/default-notification-item.js.es6
@@ -91,7 +91,7 @@ export const DefaultNotificationItem = createWidget(
       return iconNode(`notification.${notificationName}`);
     },
 
-    title(notificationName) {
+    notificationTitle(notificationName) {
       if (notificationName) {
         return I18n.t(`notifications.titles.${notificationName}`);
       } else {
@@ -108,7 +108,7 @@ export const DefaultNotificationItem = createWidget(
       let text = emojiUnescape(this.text(notificationName, data));
       let icon = this.icon(notificationName, data);
 
-      const title = this.title(notificationName, data);
+      const title = this.notificationTitle(notificationName, data);
 
       // We can use a `<p>` tag here once other languages have fixed their HTML
       // translations.

GitHub sha: 459932f4

1 Like