mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 09:52:01 +08:00
A11Y: Add more information to the "reply to" button label. (#18604)
Includes the post number and poster's username for screen readers.
This commit is contained in:
parent
07a6b6f55c
commit
588bb2ccf2
|
@ -239,6 +239,10 @@ registerButton("reply-small", (attrs) => {
|
||||||
title: "post.controls.reply",
|
title: "post.controls.reply",
|
||||||
icon: "reply",
|
icon: "reply",
|
||||||
className: "reply",
|
className: "reply",
|
||||||
|
translatedAriaLabel: I18n.t("post.sr_reply_to", {
|
||||||
|
post_number: attrs.post_number,
|
||||||
|
username: attrs.username,
|
||||||
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
return args;
|
return args;
|
||||||
|
@ -323,6 +327,10 @@ registerButton("reply", (attrs, state, siteSettings, postMenuSettings) => {
|
||||||
title: "post.controls.reply",
|
title: "post.controls.reply",
|
||||||
icon: "reply",
|
icon: "reply",
|
||||||
className: "reply create fade-out",
|
className: "reply create fade-out",
|
||||||
|
translatedAriaLabel: I18n.t("post.sr_reply_to", {
|
||||||
|
post_number: attrs.post_number,
|
||||||
|
username: attrs.username,
|
||||||
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!attrs.canCreatePost) {
|
if (!attrs.canCreatePost) {
|
||||||
|
|
|
@ -3210,6 +3210,7 @@ en:
|
||||||
gap:
|
gap:
|
||||||
one: "view %{count} hidden reply"
|
one: "view %{count} hidden reply"
|
||||||
other: "view %{count} hidden replies"
|
other: "view %{count} hidden replies"
|
||||||
|
sr_reply_to: "Reply to post #%{post_number} by @%{username}"
|
||||||
|
|
||||||
notice:
|
notice:
|
||||||
new_user: "This is the first time %{user} has posted — let’s welcome them to our community!"
|
new_user: "This is the first time %{user} has posted — let’s welcome them to our community!"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user