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:
parent
45a379cf2d
commit
73a313200d
@ -15,7 +15,7 @@ use bevy_input::keyboard::{KeyCode, KeyboardInput};
|
|||||||
use bevy_input::ButtonState;
|
use bevy_input::ButtonState;
|
||||||
use bevy_input_focus::FocusedInput;
|
use bevy_input_focus::FocusedInput;
|
||||||
use bevy_picking::events::{Click, Pointer};
|
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
|
/// 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
|
/// 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.
|
/// but rather the enclosing group should be focusable.
|
||||||
/// See <https://www.w3.org/WAI/ARIA/apg/patterns/radio>/
|
/// See <https://www.w3.org/WAI/ARIA/apg/patterns/radio>/
|
||||||
#[derive(Component, Debug)]
|
#[derive(Component, Debug)]
|
||||||
#[require(AccessibilityNode(accesskit::Node::new(Role::RadioButton)), Checked)]
|
#[require(AccessibilityNode(accesskit::Node::new(Role::RadioButton)), Checkable)]
|
||||||
pub struct CoreRadio;
|
pub struct CoreRadio;
|
||||||
|
|
||||||
fn radio_group_on_key_input(
|
fn radio_group_on_key_input(
|
||||||
|
Loading…
Reference in New Issue
Block a user