Skip to content

RadioGroup: Item with empty string value breaks arrow key selection #1320

@AlexJMohr

Description

@AlexJMohr

Describe the bug

Empty string value on RadioGroup.Item breaks selection of value with arrow keys. It correctly focuses the next/previous item, but the actual value doesn't change.

See the video: (I pressed tab to focus the radio group, then arrow keys to select items)

bits-ui-radiogroup-empty-string.mp4

Reproduction

https://stackblitz.com/edit/sveltejs-kit-template-default-q5m6h8sc?file=src%2Froutes%2F%2Bpage.svelte

Logs

System Info

System:
    OS: Linux 6.13 Arch Linux
    CPU: (32) x64 AMD Ryzen 9 7950X 16-Core Processor
    Memory: 45.03 GB / 61.93 GB
    Container: Yes
    Shell: 4.0.1 - /usr/bin/fish
  Binaries:
    Node: 22.13.1 - ~/.nvm/versions/node/v22.13.1/bin/node
    Yarn: 1.22.22 - ~/.nvm/versions/node/v22.13.1/bin/yarn
    npm: 10.9.2 - ~/.nvm/versions/node/v22.13.1/bin/npm
    pnpm: 10.2.0 - ~/.nvm/versions/node/v22.13.1/bin/pnpm
  npmPackages:
    @sveltejs/kit: ^2.17.3 => 2.20.1 
    bits-ui: ^1.3.4 => 1.3.13 
    svelte: ^5.20.4 => 5.23.2

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageA maintainer needs to review this issue and label it appropriately

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions