A11Y: Add `aria-label` to topic post badges (#18657)

This commit is contained in:
Keegan George 2022-10-18 15:14:27 -07:00 committed by GitHub
parent a8af510636
commit dcbfbbf19d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 7 deletions

View File

@ -1,11 +1,26 @@
<span class='topic-post-badges'>
{{~#if newPosts ~}}
&nbsp;<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~}}
&nbsp;<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 ~}}
&nbsp;<a href='{{url}}' class='badge badge-notification unread-posts' title='{{i18n "topic.unread_posts" count=unreadPosts}}'>{{unreadPosts}}</a>
{{~#if unreadPosts~}}
&nbsp;<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 ~}}
&nbsp;<a href='{{url}}' class='badge badge-notification new-topic' title='{{i18n "topic.new"}}'>{{newDotText}}</a>
{{~#if unseen~}}
&nbsp;<a
href="{{url}}"
class="badge badge-notification new-topic"
title="{{i18n 'topic.new'}}"
aria-label="{{i18n 'topic.new'}}"
>{{newDotText}}</a>
{{~/if}}
</span>