A11Y: Include username in aria-label of post region

I think the author of a post is a critical piece of information that
should be communicated right when the post region is reached.
This commit is contained in:
OsamaSayegh 2022-03-28 22:05:26 +03:00 committed by Osama Sayegh
parent e7c16bc49a
commit ef66b3fd40
2 changed files with 2 additions and 1 deletions

View File

@ -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,

View File

@ -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"