Description
I noticed that when you use ActionMenu.Anchor for an ActionMenu, there is no way to specify an Id for the button because it checks the anchor/button itself (not the children) for an id but the Anchor type doesn't include an id, unlike the Button type
Steps to reproduce
Example code:
https://github.com/github/github/blob/080953f77c52d03e8c896ec94a9f8592d0a48878/ui/packages/copilot-code-chat/CopilotChatButton.tsx#L67C11-L78C31
<ActionMenu.Anchor>
<IconButtonWithTooltip
id="ICON_ID"
icon={TriangleDownIcon}
label="Copilot menu"
hideTooltip={open}
onSelect={() => setOpen(true)}
size="small"
sx={{...squareHeightSx, '>span': {mb: 0}, color: 'fg.muted'}}
tooltipDirection="sw"
data-testid="more-copilot-button"
/>
</ActionMenu.Anchor>
The button will have a random ID assigned and the Anchor will not accept an ID itself.
Version
current
Browser
Chrome, Safari, Firefox, Edge, iOS Safari
Description
I noticed that when you use
ActionMenu.Anchorfor an ActionMenu, there is no way to specify an Id for the button because it checks the anchor/button itself (not the children) for an id but the Anchor type doesn't include an id, unlike the Button typeSteps to reproduce
Example code:
https://github.com/github/github/blob/080953f77c52d03e8c896ec94a9f8592d0a48878/ui/packages/copilot-code-chat/CopilotChatButton.tsx#L67C11-L78C31
The button will have a random ID assigned and the Anchor will not accept an ID itself.
Version
current
Browser
Chrome, Safari, Firefox, Edge, iOS Safari