Skip to content

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

A11Y: Hide post avatar link from screen readers

awesomerobot6977f7826612
diff --git a/app/assets/javascripts/discourse/app/widgets/post.js b/app/assets/javascripts/discourse/app/widgets/post.js
index d93f410350b..a63263ea297 100644
--- a/app/assets/javascripts/discourse/app/widgets/post.js
+++ b/app/assets/javascripts/discourse/app/widgets/post.js
@@ -64,7 +64,11 @@ export function avatarFor(wanted, attrs) {
"a",
{
className: `trigger-user-card ${attrs.className || ""}`,
- attributes: { href: attrs.url, "data-user-card": attrs.username },
+ attributes: {
+ href: attrs.url,
+ "data-user-card": attrs.username,
+ "aria-hidden": true,
+ },
},
avatarImg(wanted, attrs)
);