We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6aad856 commit a2e7c44Copy full SHA for a2e7c44
packages/components/src/tooltip/index.tsx
@@ -109,7 +109,10 @@ function UnforwardedTooltip(
109
// the tooltip anchor anymore since 0.4.0, so we need to add it manually.
110
// See: https://github.com/WordPress/gutenberg/pull/64066
111
function addDescribedById( element: React.ReactElement ) {
112
- return describedById && mounted
+ return describedById &&
113
+ mounted &&
114
+ element.props[ 'aria-describedby' ] === undefined &&
115
+ element.props[ 'aria-label' ] !== text
116
? cloneElement( element, { 'aria-describedby': describedById } )
117
: element;
118
}
0 commit comments