Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'aria-hidden' cannot be used in <React.fragment> in the dropdown menu. #3211

Closed
Kimhansoool opened this issue Nov 4, 2024 · 2 comments
Closed

Comments

@Kimhansoool
Copy link

Kimhansoool commented Nov 4, 2024

Bug report

Current Behavior

When migration to Next15 and React19, an error appears saying that 'aria-hidden' cannot be used in <React.fragment>.
After searching the radix-ui menu components package code, I found that 'aria-hidden' was added whild return hideothers in MenuRootContentModal.

image

image

const MenuRootContentModal = React.forwardRef<MenuRootContentTypeElement, MenuRootContentTypeProps>(

image
https://github.com/theKashey/aria-hidden/blob/52c7374abb9fb0a348c63b9ff613a575868cec62/src/index.ts#L174

Reproducible example

Using dropdown menu package in next15...

Your environment

Software Name(s) Version
Radix Package(s) dropdown menu ^2.1.1
React n/a 19.0.0-rc-45804af1-20241021
Next n/a 15.0.1
Browser chrome
Assistive tech
Node n/a 20.12.2
npm/yarn pnpm 8.14.1
Operating System window 11
@V-iktor
Copy link

V-iktor commented Nov 11, 2024

I am also getting a lot of these errors on Accordion / DropdownMenu

Invalid prop data-statesupplied toReact.Fragment. React.Fragment can only have keyandchildren props.

Invalid prop data-orientationsupplied toReact.Fragment. React.Fragment can only have keyandchildrenprops.

Dependencies

    "@radix-ui/react-accordion": "^1.2.1",
    "@radix-ui/react-checkbox": "1.1.2",
    "@radix-ui/react-dialog": "^1.1.2",
    "@radix-ui/react-dropdown-menu": "2.1.2",
    "@radix-ui/react-form": "^0.1.0",
    "@radix-ui/react-popover": "1.1.2",
    "@radix-ui/react-radio-group": "^1.2.1",
    "@radix-ui/react-scroll-area": "1.2.0",
    "@radix-ui/react-select": "2.1.2",
    "@radix-ui/react-slot": "1.1.0",
    "@radix-ui/react-tabs": "^1.1.1",
    "@radix-ui/react-tooltip": "1.1.3",

@Kimhansoool Kimhansoool changed the title When migrating to Next15, an error appears saying that 'aria-hidden' cannot be used in <React.fragment> in the dropdown menu components(menu). 'aria-hidden' cannot be used in <React.fragment> in the dropdown menu. Nov 13, 2024
@Kimhansoool
Copy link
Author

Kimhansoool commented Nov 18, 2024

Problem solved in that request #3229

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants