Merge pull request #1354 from jsit/fix/add-aria-label-to-featured-pins

fix(a11y): Add aria-label to featured pins
This commit is contained in:
SleeplessOne1917 2023-06-19 23:34:19 +00:00 committed by GitHub
commit 70645cf3b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

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