Skip to content

Commit

Permalink
Navigation Link: Replace missing link tooltip with ARIA label
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshupathak95 committed Jan 13, 2025
1 parent d3758ce commit 7850e1d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions packages/block-library/src/navigation-link/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -532,11 +532,12 @@ export default function NavigationLinkEdit( {
<a className={ classes }>
{ /* eslint-enable */ }
{ ! url ? (
<div className="wp-block-navigation-link__placeholder-text">
<Tooltip text={ tooltipText }>
<span>{ missingText }</span>
</Tooltip>
</div>
<span
className="wp-block-navigation-link__placeholder-text"
aria-label={ __( 'This item is missing a link' ) }
>
{ missingText }
</span>
) : (
<>
{ ! isInvalid &&
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/navigation-link/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
background-image: none !important;

// Draw a wavy underline.
.wp-block-navigation-link__placeholder-text span {
.wp-block-navigation-link__placeholder-text {
$blur: 10%;
$width: 6%;
$stop1: 30%;
Expand Down

0 comments on commit 7850e1d

Please sign in to comment.