FIX: Update aria-labels on mobile / dropdown (#254)
- Update aria labels on mobile and for re-assign dropdown - Fixes: https://dev.discourse.org/t/quicker-assign-to-self-when-group-is-assigned/54647/33?u=isaacjanzen
This commit is contained in:
parent
cb0a65b844
commit
09d254b369
|
@ -129,7 +129,12 @@ function registerTopicFooterButtons(api) {
|
||||||
const content = [
|
const content = [
|
||||||
{
|
{
|
||||||
id: "unassign",
|
id: "unassign",
|
||||||
name: htmlSafe(
|
name: I18n.t("discourse_assign.unassign.help", {
|
||||||
|
username:
|
||||||
|
this.topic.assigned_to_user?.username ||
|
||||||
|
this.topic.assigned_to_group?.name,
|
||||||
|
}),
|
||||||
|
label: htmlSafe(
|
||||||
`${iconHTML("user-times")} ${I18n.t(
|
`${iconHTML("user-times")} ${I18n.t(
|
||||||
"discourse_assign.unassign.title"
|
"discourse_assign.unassign.title"
|
||||||
)}`
|
)}`
|
||||||
|
@ -143,7 +148,8 @@ function registerTopicFooterButtons(api) {
|
||||||
) {
|
) {
|
||||||
content.push({
|
content.push({
|
||||||
id: "reassign-self",
|
id: "reassign-self",
|
||||||
name: htmlSafe(
|
name: I18n.t("discourse_assign.reassign.to_self_help"),
|
||||||
|
label: htmlSafe(
|
||||||
`${iconHTML("user-plus")} ${I18n.t(
|
`${iconHTML("user-plus")} ${I18n.t(
|
||||||
"discourse_assign.reassign.to_self"
|
"discourse_assign.reassign.to_self"
|
||||||
)}`
|
)}`
|
||||||
|
@ -152,7 +158,8 @@ function registerTopicFooterButtons(api) {
|
||||||
}
|
}
|
||||||
content.push({
|
content.push({
|
||||||
id: "reassign",
|
id: "reassign",
|
||||||
name: htmlSafe(
|
name: I18n.t("discourse_assign.reassign.help"),
|
||||||
|
label: htmlSafe(
|
||||||
`${iconHTML("group-plus")} ${I18n.t(
|
`${iconHTML("group-plus")} ${I18n.t(
|
||||||
"discourse_assign.reassign.title_w_ellipsis"
|
"discourse_assign.reassign.title_w_ellipsis"
|
||||||
)}`
|
)}`
|
||||||
|
@ -311,10 +318,10 @@ function registerTopicFooterButtons(api) {
|
||||||
return "user-plus";
|
return "user-plus";
|
||||||
},
|
},
|
||||||
translatedTitle() {
|
translatedTitle() {
|
||||||
return defaultTitle(this);
|
return I18n.t("discourse_assign.reassign.to_self_help");
|
||||||
},
|
},
|
||||||
translatedAriaLabel() {
|
translatedAriaLabel() {
|
||||||
return defaultTitle(this);
|
return I18n.t("discourse_assign.reassign.to_self_help");
|
||||||
},
|
},
|
||||||
translatedLabel() {
|
translatedLabel() {
|
||||||
const label = I18n.t("discourse_assign.reassign.to_self");
|
const label = I18n.t("discourse_assign.reassign.to_self");
|
||||||
|
@ -361,10 +368,10 @@ function registerTopicFooterButtons(api) {
|
||||||
return "group-plus";
|
return "group-plus";
|
||||||
},
|
},
|
||||||
translatedTitle() {
|
translatedTitle() {
|
||||||
return defaultTitle(this);
|
return I18n.t("discourse_assign.reassign.help");
|
||||||
},
|
},
|
||||||
translatedAriaLabel() {
|
translatedAriaLabel() {
|
||||||
return defaultTitle(this);
|
return I18n.t("discourse_assign.reassign.help");
|
||||||
},
|
},
|
||||||
translatedLabel() {
|
translatedLabel() {
|
||||||
const label = I18n.t("discourse_assign.reassign.title_w_ellipsis");
|
const label = I18n.t("discourse_assign.reassign.title_w_ellipsis");
|
||||||
|
|
|
@ -43,6 +43,7 @@ en:
|
||||||
title: "Re-assign"
|
title: "Re-assign"
|
||||||
title_w_ellipsis: "Re-assign to..."
|
title_w_ellipsis: "Re-assign to..."
|
||||||
to_self: "Re-assign to me"
|
to_self: "Re-assign to me"
|
||||||
|
to_self_help: "Re-assign Topic to me"
|
||||||
help: "Re-assign Topic to a different user"
|
help: "Re-assign Topic to a different user"
|
||||||
reassign_modal:
|
reassign_modal:
|
||||||
title: "Re-assign Topic"
|
title: "Re-assign Topic"
|
||||||
|
|
Loading…
Reference in New Issue