Skip to content

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

UX: add ARIA region role to posts (#13130)

Sam6e2ecf40c745
diff --git a/app/assets/javascripts/discourse/app/widgets/post.js b/app/assets/javascripts/discourse/app/widgets/post.js
index 9a02a73f2d0..f1afc5f6144 100644
--- a/app/assets/javascripts/discourse/app/widgets/post.js
+++ b/app/assets/javascripts/discourse/app/widgets/post.js
@@ -596,6 +596,10 @@ createWidget("post-article", {
buildAttributes(attrs) {
return {
+ "aria-label": I18n.t("share.post", {
+ postNumber: attrs.post_number,
+ }),
+ role: "region",
"data-post-id": attrs.id,
"data-topic-id": attrs.topicId,
"data-user-id": attrs.user_id,