rusackas commented on code in PR #43015:
URL: https://github.com/apache/superset/pull/43015#discussion_r3754693843
##########
superset-frontend/packages/superset-ui-core/src/components/Dropdown/index.tsx:
##########
@@ -84,17 +84,18 @@ const RenderIcon = (
return component;
};
-export const MenuDotsDropdown = ({
- overlay,
- iconOrientation = IconOrientation.Vertical,
- ...rest
-}: MenuDotsDropdownProps) => (
+export const MenuDotsDropdown = forwardRef<
+ HTMLDivElement,
+ MenuDotsDropdownProps
+>(({ overlay, iconOrientation = IconOrientation.Vertical, ...rest }, ref) => (
<AntdDropdown popupRender={() => overlay} {...rest}>
- <MenuDotsWrapper data-test="dropdown-trigger">
+ <MenuDotsWrapper ref={ref} tabIndex={0} data-test="dropdown-trigger">
{RenderIcon(iconOrientation)}
</MenuDotsWrapper>
</AntdDropdown>
Review Comment:
Good catch. Switched the trigger to a real `<button>` (was a `div` with
`role="button"`) so it gets Enter/Space activation natively, and added an
`aria-label`. No caller passes `disabled` today so I left that out rather than
adding unused logic.
--
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]