codeant-ai-for-open-source[bot] commented on code in PR #43015:
URL: https://github.com/apache/superset/pull/43015#discussion_r3777468976
##########
superset-frontend/packages/superset-ui-core/src/components/Dropdown/index.tsx:
##########
@@ -84,17 +88,23 @@ const RenderIcon = (
return component;
};
-export const MenuDotsDropdown = ({
- overlay,
- iconOrientation = IconOrientation.Vertical,
- ...rest
-}: MenuDotsDropdownProps) => (
+export const MenuDotsDropdown = forwardRef<
+ HTMLButtonElement,
+ MenuDotsDropdownProps
+>(({ overlay, iconOrientation = IconOrientation.Vertical, ...rest }, ref) => (
<AntdDropdown popupRender={() => overlay} {...rest}>
- <MenuDotsWrapper data-test="dropdown-trigger">
+ <MenuDotsWrapper
+ ref={ref}
+ type="button"
+ aria-label={t('Actions')}
+ data-test="dropdown-trigger"
+ >
{RenderIcon(iconOrientation)}
</MenuDotsWrapper>
Review Comment:
**Suggestion:** The `disabled` prop remains on `AntdDropdown` but is not
forwarded to the new native trigger. Consequently, callers such as `ActionCell`
that pass `disabled` still render a focusable and apparently clickable button,
whereas the previous non-focusable `div` did not add a keyboard tab stop.
Forward the disabled state to `MenuDotsWrapper` so disabled dropdown actions
cannot receive focus or appear interactive. [api mismatch]
<details>
<summary><b>Severity Level:</b> Major ⚠️</summary>
```mdx
- ⚠️ Empty `ActionCell` menus leave inaccessible disabled controls focusable.
- ⚠️ Keyboard users encounter an action trigger with no available actions.
- ⚠️ Disabled state is visually and semantically incomplete.
```
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=90a26dc0e4f54221be951c0e04faa9b0&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
[](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=90a26dc0e4f54221be951c0e04faa9b0&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:**
superset-frontend/packages/superset-ui-core/src/components/Dropdown/index.tsx
**Line:** 96:103
**Comment:**
*Api Mismatch: The `disabled` prop remains on `AntdDropdown` but is not
forwarded to the new native trigger. Consequently, callers such as `ActionCell`
that pass `disabled` still render a focusable and apparently clickable button,
whereas the previous non-focusable `div` did not add a keyboard tab stop.
Forward the disabled state to `MenuDotsWrapper` so disabled dropdown actions
cannot receive focus or appear interactive.
Validate the correctness of the flagged issue. If correct, How can I resolve
this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask
user if the user wants to fix the rest of the comments as well. if said yes,
then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43015&comment_hash=7136d402fc9d098a99a5ba3648ef4a82f4c251b3380e3e79647b295d192add9a&reaction=like'>👍</a>
| <a
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43015&comment_hash=7136d402fc9d098a99a5ba3648ef4a82f4c251b3380e3e79647b295d192add9a&reaction=dislike'>👎</a>
--
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]