CoreRadio should require Checkable, not Checked. (#19836)

This was a mistake in my original PR #19778: a holdover from when
Checked was not a marker component.
This commit is contained in:
Talin 2025-06-27 11:23:59 -07:00 committed by GitHub
parent 45a379cf2d
commit 73a313200d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,7 +15,7 @@ use bevy_input::keyboard::{KeyCode, KeyboardInput};
use bevy_input::ButtonState;
use bevy_input_focus::FocusedInput;
use bevy_picking::events::{Click, Pointer};
use bevy_ui::{Checked, InteractionDisabled};
use bevy_ui::{Checkable, Checked, InteractionDisabled};
/// Headless widget implementation for a "radio button group". This component is used to group
/// multiple [`CoreRadio`] components together, allowing them to behave as a single unit. It
@ -46,7 +46,7 @@ pub struct CoreRadioGroup {
/// but rather the enclosing group should be focusable.
/// See <https://www.w3.org/WAI/ARIA/apg/patterns/radio>/
#[derive(Component, Debug)]
#[require(AccessibilityNode(accesskit::Node::new(Role::RadioButton)), Checked)]
#[require(AccessibilityNode(accesskit::Node::new(Role::RadioButton)), Checkable)]
pub struct CoreRadio;
fn radio_group_on_key_input(