Skip to content

[radio group] Does not match form data of native radio when submitted with no checked items #2447

@mirka

Description

@mirka

Bug report

Current behavior

When a Radio is integrated into a form and is submitted without any items checked, the resulting form data for that name key is an empty string. This differs from a native radio group, where the form data would be null.

Expected behavior

The form data for that key would be null, matching the native behavior.

(cf. Checkbox, which does return null for the key when submitted unchecked, matching the native checkbox behavior.)

Reproducible example

CodeSandbox

Base UI version

1.0.0-beta.2

Which browser are you using?

Chrome

Which OS are you using?

Mac OS

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope: radio groupThis is the name of the generic UI component, not the React module!type: bugIt doesn't behave as expected.

    Projects

    Status

    Recently completed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions