Skip to content

A platform for community discussion. Free, open, simple.

A11Y: Include username in aria-label of post region

OsamaSayeghef66b3fd4066
diff --git a/app/assets/javascripts/discourse/app/widgets/post.js b/app/assets/javascripts/discourse/app/widgets/post.js
index 7de22a26342..2845a51cf34 100644
--- a/app/assets/javascripts/discourse/app/widgets/post.js
+++ b/app/assets/javascripts/discourse/app/widgets/post.js
@@ -652,6 +652,7 @@ createWidget("post-article", {
return {
"aria-label": I18n.t("share.post", {
postNumber: attrs.post_number,
+ username: attrs.username,
}),
role: "region",
"data-post-id": attrs.id,
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index fd4bce61ee0..8655fc83fdf 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -136,7 +136,7 @@ en:
to_placeholder: "to date"
share:
topic_html: 'Topic: <span class="topic-title">%{topicTitle}</span>'
- post: "post #%{postNumber}"
+ post: "post #%{postNumber} by @%{username}"
close: "close"
twitter: "Share on Twitter"
facebook: "Share on Facebook"