diff --git a/app/assets/javascripts/discourse/app/components/group-post.js b/app/assets/javascripts/discourse/app/components/group-post.js index 074f856b407..a233bc12cc0 100644 --- a/app/assets/javascripts/discourse/app/components/group-post.js +++ b/app/assets/javascripts/discourse/app/components/group-post.js @@ -4,6 +4,7 @@ import getURL from "discourse-common/lib/get-url"; import { prioritizeNameInUx } from "discourse/lib/settings"; import { propertyEqual } from "discourse/lib/computed"; import { userPath } from "discourse/lib/url"; +import I18n from "I18n"; export default Component.extend({ classNameBindings: [ @@ -41,4 +42,9 @@ export default Component.extend({ userUrl(username) { return userPath(username.toLowerCase()); }, + + @discourseComputed("post.topic.title", "post.post_number") + titleAriaLabel(title, postNumber) { + return I18n.t("groups.aria_post_number", { postNumber, title }); + }, }); diff --git a/app/assets/javascripts/discourse/app/templates/components/group-post.hbs b/app/assets/javascripts/discourse/app/templates/components/group-post.hbs index a442d7f0775..901ebeb9360 100644 --- a/app/assets/javascripts/discourse/app/templates/components/group-post.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/group-post.hbs @@ -6,7 +6,9 @@
- {{html-safe this.post.topic.fancyTitle}} + + {{html-safe this.post.topic.fancyTitle}} +
{{category-link this.post.category}}
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index bb55ec4f1d7..b13e39725ae 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -922,6 +922,7 @@ en: no_filter_matches: "No members match that search." topics: "Topics" posts: "Posts" + aria_post_number: "%{title} - post #%{postNumber}" mentions: "Mentions" messages: "Messages" notification_level: "Default notification level for group messages"