A platform for community discussion. Free, open, simple.
A11Y: Add `aria-label` to topic post badges (#18657)
Keegan Georgedcbfbbf19d36
diff --git a/app/assets/javascripts/discourse/app/templates/topic-post-badges.hbr b/app/assets/javascripts/discourse/app/templates/topic-post-badges.hbrindex 5c1ec0cd2bf..81017949a6c 100644--- a/app/assets/javascripts/discourse/app/templates/topic-post-badges.hbr+++ b/app/assets/javascripts/discourse/app/templates/topic-post-badges.hbr@@ -1,11 +1,26 @@-<span class='topic-post-badges'>- {{~#if newPosts ~}}- <a href='{{url}}' class='badge badge-notification unread-posts' title='{{i18n "topic.unread_posts" count=newPosts}}'>{{newPosts}}</a>+<span class="topic-post-badges">+ {{~#if newPosts~}}+ <a+ href="{{url}}"+ class="badge badge-notification unread-posts"+ title="{{i18n 'topic.unread_posts' count=newPosts}}"+ aria-label="{{i18n 'topic.unread_posts' count=newPosts}}"+ >{{newPosts}}</a>{{~/if}}- {{~#if unreadPosts ~}}- <a href='{{url}}' class='badge badge-notification unread-posts' title='{{i18n "topic.unread_posts" count=unreadPosts}}'>{{unreadPosts}}</a>+ {{~#if unreadPosts~}}+ <a+ href="{{url}}"+ class="badge badge-notification unread-posts"+ title="{{i18n 'topic.unread_posts' count=unreadPosts}}"+ aria-label="{{i18n 'topic.unread_posts' count=unreadPosts}}"+ >{{unreadPosts}}</a>{{~/if}}- {{~#if unseen ~}}- <a href='{{url}}' class='badge badge-notification new-topic' title='{{i18n "topic.new"}}'>{{newDotText}}</a>+ {{~#if unseen~}}+ <a+ href="{{url}}"+ class="badge badge-notification new-topic"+ title="{{i18n 'topic.new'}}"+ aria-label="{{i18n 'topic.new'}}"+ >{{newDotText}}</a>{{~/if}}</span>