fix(a11y): Add aria-label to fetaured pins
authorJay Sitter <jay@jaysitter.com>
Sat, 17 Jun 2023 17:08:56 +0000 (13:08 -0400)
committerJay Sitter <jay@jaysitter.com>
Sat, 17 Jun 2023 17:08:56 +0000 (13:08 -0400)
src/shared/components/post/post-listing.tsx

index b9d4125075fff34fb8d9b1eaba4156205dfdcf4f..36d96a967506a8c47c1450a9b7b9a26577dcc86e 100644 (file)
@@ -582,7 +582,8 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
           {post.featured_community && (
             <small
               className="unselectable pointer ml-2 text-muted font-italic"
-              data-tippy-content={i18n.t("featured")}
+              aria-label={i18n.t("featured_in_community")}
+              data-tippy-content={i18n.t("featured_in_community")}
             >
               <Icon icon="pin" classes="icon-inline text-primary" />
             </small>
@@ -590,7 +591,8 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
           {post.featured_local && (
             <small
               className="unselectable pointer ml-2 text-muted font-italic"
-              data-tippy-content={i18n.t("featured")}
+              aria-label={i18n.t("featured_in_local")}
+              data-tippy-content={i18n.t("featured_in_local")}
             >
               <Icon icon="pin" classes="icon-inline text-secondary" />
             </small>