Skip to content

Commit

Permalink
Add aria-label to arrow container
Browse files Browse the repository at this point in the history
  • Loading branch information
jameskoster committed Apr 2, 2024
1 parent d586f79 commit 60cf335
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/components/src/external-link/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { forwardRef } from '@wordpress/element';
/**
* Internal dependencies
*/
import { VisuallyHidden } from '../visually-hidden';
import type { ExternalLinkProps } from './types';
import type { WordPressComponentProps } from '../context';

Expand Down Expand Up @@ -67,13 +66,15 @@ function UnforwardedExternalLink(
<span className="components-external-link__contents">
{ children }
</span>
<VisuallyHidden as="span">
{
<span
className="components-external-link__icon"
aria-label={
/* translators: accessibility text */
__( '(opens in a new tab)' )
}
</VisuallyHidden>
<span className="components-external-link__icon">&#8599;</span>
>
&#8599;
</span>
</a>
/* eslint-enable react/jsx-no-target-blank */
);
Expand Down

0 comments on commit 60cf335

Please sign in to comment.