Copilot commented on code in PR #43015:
URL: https://github.com/apache/superset/pull/43015#discussion_r3754032278
##########
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:
`MenuDotsDropdown` makes its trigger tabbable via `tabIndex={0}`, but the
trigger is still a plain `div` with no explicit button semantics. This leaves
keyboard/screen-reader behavior incomplete (no role/label), and when `disabled`
is set on the dropdown the trigger remains in the tab order even though it
can’t be used. Consider giving the trigger button semantics (role + aria-label)
and handling Enter/Space to open it, while removing it from tab order when
disabled.
--
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]