bito-code-review[bot] commented on PR #43425:
URL: https://github.com/apache/superset/pull/43425#issuecomment-5381630250
<!-- Bito Reply -->
The flagged issue is correct. The `Icons.InfoCircleOutlined` component is
currently inside a `span` that lacks keyboard focusability and button
semantics, making the `onClick` handler inaccessible to keyboard users. To
resolve this, you should convert the wrapper `span` into a `button` element
with appropriate styling to maintain the layout, or add `tabIndex={0}` and
`role="button"` along with keyboard event handlers to the existing wrapper.
Here is a concise fix using a `button` element:
```tsx
<button
type="button"
data-test={`${name}-description-icon`}
onMouseEnter={() => onDescriptionHoverChange?.(true)}
onMouseLeave={() => onDescriptionHoverChange?.(false)}
onClick={tooltipOnClick}
css={css`
background: none;
border: none;
padding: 0;
cursor: pointer;
`}
aria-label={t('Show info tooltip')}
>
<Tooltip
id="description-tooltip"
title={description}
placement="top"
mouseLeaveDelay={0}
>
<Icons.InfoCircleOutlined css={iconStyles} />
</Tooltip>{' '}
</button>
```
Would you like me to check the rest of the comments on this PR and implement
fixes for them as well?
**superset-frontend/src/explore/components/ControlHeader.tsx**
```
<button
type="button"
data-test={`${name}-description-icon`}
onMouseEnter={() => onDescriptionHoverChange?.(true)}
onMouseLeave={() => onDescriptionHoverChange?.(false)}
onClick={tooltipOnClick}
css={css`
background: none;
border: none;
padding: 0;
cursor: pointer;
`}
aria-label={t('Show info tooltip')}
>
<Tooltip
id="description-tooltip"
title={description}
placement="top"
mouseLeaveDelay={0}
>
<Icons.InfoCircleOutlined css={iconStyles} />
</Tooltip>{' '}
</button>
```
--
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]