Skip to content

Commit

Permalink
Block Editor: Remove aria-selected from LinkPreview (#43279)
Browse files Browse the repository at this point in the history
* Block Editor: Fix LinkPreview role

* Remove role and aria-selected and fix test
  • Loading branch information
tyxla authored Aug 18, 2022
1 parent c9c7c54 commit fd3a47b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ export default function LinkPreview( {
return (
<div
aria-label={ __( 'Currently selected' ) }
aria-selected="true"
className={ classnames( 'block-editor-link-control__search-item', {
'is-current': true,
'is-rich': hasRichData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,7 @@ describe( 'Basic rendering', () => {
/>
);

const linkPreview = screen.queryByRole( 'generic', {
name: 'Currently selected',
} );
const linkPreview = getCurrentLink();

const isPreviewError = linkPreview.classList.contains( 'is-error' );
expect( isPreviewError ).toBe( true );
Expand Down

0 comments on commit fd3a47b

Please sign in to comment.