radix-ui / primitives

Radix Primitives is an open-source UI component library for building high-quality, accessible design systems and web apps. Maintained by @workos.
https://radix-ui.com/primitives
MIT License
15.41k stars 771 forks source link

[RadioGroup] 'required' prop doesn't do anything #2322

Closed dadamssg closed 1 year ago

dadamssg commented 1 year ago

Bug report

Current Behavior

I'm adding the required prop but it doesn't trigger any native input validation.

image

As you can see in the screenshot, it skips over the radio group and stops on the validation of the text input.

Expected behavior

I expect a native validation message on the radio group.

Reproducible example

https://codesandbox.io/s/hardcore-knuth-48dwl9?file=/src/App.js

Your environment

Software Name(s) Version
Radix Package(s) @radix-ui/react-radio-group 1.1.3
React n/a 18.2.0
Browser Chrome 115.0.5790.114
Assistive tech
Node n/a v16.18.1
npm/yarn npm 8.19.2
Operating System mac ventura 13.4.1
dadamssg commented 1 year ago

Ah disregard. I figured out you must have a name specified on the RadioGroup.