sadpandajoe commented on code in PR #43425:
URL: https://github.com/apache/superset/pull/43425#discussion_r3857893745
##########
superset-frontend/src/explore/components/ControlHeader.tsx:
##########
@@ -89,24 +91,42 @@ const ControlHeader: FC<ControlHeaderProps> = ({
position: absolute;
top: 50%;
right: 0;
+ z-index: 1;
padding-left: ${theme.sizeUnit}px;
transform: translate(100%, -50%);
white-space: nowrap;
+ pointer-events: auto;
`}
>
{description && (
- <span>
+ <>
<Tooltip
id="description-tooltip"
title={description}
placement="top"
+ mouseLeaveDelay={0}
+ trigger={['hover', 'focus']}
>
- <Icons.InfoCircleOutlined
- css={iconStyles}
+ {/* Same role="button" pattern as the label text: a real <button>
+ is not valid inside FormLabel's <label>. */}
+ <span
+ // eslint-disable-next-line jsx-a11y/prefer-tag-over-role
+ role="button"
+ tabIndex={0}
+ data-test={`${name}-description-icon`}
+ aria-label={t('Show info tooltip')}
+ onMouseEnter={() => onDescriptionHoverChange?.(true)}
Review Comment:
Focusing this icon opens the description tooltip, but the callback only
changes the suppression state for mouse enter/leave. If the date-range value
remains hovered while focus moves to the icon, both tooltips are visible again.
Could the focus and blur handlers update the same state?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]