A11Y: add aria-label to header notification counts (#20231)
This commit is contained in:
parent
827df072a6
commit
3e826a67d1
|
@ -95,6 +95,14 @@ createWidget("header-notifications", {
|
||||||
titleOptions: {
|
titleOptions: {
|
||||||
count: user.new_personal_messages_notifications_count,
|
count: user.new_personal_messages_notifications_count,
|
||||||
},
|
},
|
||||||
|
attributes: {
|
||||||
|
"aria-label": I18n.t(
|
||||||
|
"notifications.tooltip.new_message_notification",
|
||||||
|
{
|
||||||
|
count: user.new_personal_messages_notifications_count,
|
||||||
|
}
|
||||||
|
),
|
||||||
|
},
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
} else if (user.unseen_reviewable_count) {
|
} else if (user.unseen_reviewable_count) {
|
||||||
|
@ -106,6 +114,11 @@ createWidget("header-notifications", {
|
||||||
omitSpan: true,
|
omitSpan: true,
|
||||||
title: "notifications.tooltip.new_reviewable",
|
title: "notifications.tooltip.new_reviewable",
|
||||||
titleOptions: { count: user.unseen_reviewable_count },
|
titleOptions: { count: user.unseen_reviewable_count },
|
||||||
|
attributes: {
|
||||||
|
"aria-label": I18n.t("notifications.tooltip.new_reviewable", {
|
||||||
|
count: user.unseen_reviewable_count,
|
||||||
|
}),
|
||||||
|
},
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
} else if (user.all_unread_notifications_count) {
|
} else if (user.all_unread_notifications_count) {
|
||||||
|
@ -118,6 +131,9 @@ createWidget("header-notifications", {
|
||||||
omitSpan: true,
|
omitSpan: true,
|
||||||
title: "notifications.tooltip.regular",
|
title: "notifications.tooltip.regular",
|
||||||
titleOptions: { count: user.all_unread_notifications_count },
|
titleOptions: { count: user.all_unread_notifications_count },
|
||||||
|
attributes: {
|
||||||
|
"aria-label": I18n.t("user.notifications"),
|
||||||
|
},
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue