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
tyxla authored Aug 18, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent c9c7c54 commit fd3a47b
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
@@ -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,
Original file line number Diff line number Diff line change
@@ -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 );

0 comments on commit fd3a47b

Please sign in to comment.