Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions platforms/android/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,7 @@ impl NodeWrapper<'_> {
}

fn is_selected(&self) -> bool {
match self.0.role() {
// https://www.w3.org/TR/core-aam-1.1/#mapping_state-property_table
// SelectionItem.IsSelected is set according to the True or False
// value of aria-checked for 'radio' and 'menuitemradio' roles.
Role::RadioButton | Role::MenuItemRadio => self.0.toggled() == Some(Toggled::True),
// https://www.w3.org/TR/wai-aria-1.1/#aria-selected
// SelectionItem.IsSelected is set according to the True or False
// value of aria-selected.
_ => self.0.is_selected().unwrap_or(false),
}
self.0.is_selected().unwrap_or(false)
}

fn content_description(&self) -> Option<String> {
Expand Down