From b5f40d8fc51491a5fe18eeba09afd9b4b24b652b Mon Sep 17 00:00:00 2001 From: Josefina Mancilla <32556167+jnm2377@users.noreply.github.com> Date: Tue, 11 May 2021 18:37:26 -0500 Subject: [PATCH] fix(Tooltip): make screenreader description less verbose (#8641) * fix: tooltip screenreader description * fix: add back removed triggerId Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- packages/react/src/components/Tooltip/Tooltip.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/packages/react/src/components/Tooltip/Tooltip.js b/packages/react/src/components/Tooltip/Tooltip.js index 8304e865bda4..05bba777e82b 100644 --- a/packages/react/src/components/Tooltip/Tooltip.js +++ b/packages/react/src/components/Tooltip/Tooltip.js @@ -510,7 +510,8 @@ class Tooltip extends Component {
+ ref={refProp} + aria-describedby={tooltipBodyId}>
@@ -519,7 +520,8 @@ class Tooltip extends Component { id={triggerId} className={triggerClasses} ref={refProp} - {...properties}> + {...properties} + aria-describedby={tooltipBodyId}> {triggerText} )} @@ -544,14 +546,9 @@ class Tooltip extends Component { onMouseOut={this.handleMouse} onFocus={this.handleMouse} onBlur={this.handleMouse} - onContextMenu={this.handleMouse} - role="tooltip"> + onContextMenu={this.handleMouse}> -
+
{children}