Skip to content

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

A11Y: Add button role to the reply-to-tab anchor on desktop (#26321)

Kris113b4246e641
diff --git a/app/assets/javascripts/discourse/app/widgets/post.js b/app/assets/javascripts/discourse/app/widgets/post.js
index ea8870e56b4..e88190aea12 100644
--- a/app/assets/javascripts/discourse/app/widgets/post.js
+++ b/app/assets/javascripts/discourse/app/widgets/post.js
@@ -163,6 +163,7 @@ createWidget("reply-to-tab", {
};
if (!this.attrs.mobileView) {
+ result["role"] = "button";
result["aria-controls"] = `embedded-posts__top--${attrs.post_number}`;
result["aria-expanded"] = this.attrs.repliesAbove.length
? "true"