ayush-singh-0601 commented on code in PR #43425:
URL: https://github.com/apache/superset/pull/43425#discussion_r3870416782
##########
superset-frontend/src/explore/components/ControlHeader.tsx:
##########
@@ -89,24 +91,44 @@ 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}
Review Comment:
Thanks, that was the missing piece. The info icon only mounts when `hovered`
is true, and `Control.tsx` previously set that solely from mouse enter/leave,
so tabbing into Date Range never created the focus target.
`Control` now tracks hover and focus separately (blur is ignored while focus
stays inside the control) and passes `hovered || focused` down, so the icon
mounts when Date Range receives keyboard focus. Covered in `Control.test.tsx`.
Fixed in 887d918.
--
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]