MCPcopy Create free account
hub / github.com/AccessKit/accesskit / is_selected

Method is_selected

platforms/windows/src/node.rs:652–663  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

650 }
651
652 pub(crate) fn is_selected(&self) -> bool {
653 match self.0.role() {
654 // https://www.w3.org/TR/core-aam-1.1/#mapping_state-property_table
655 // SelectionItem.IsSelected is set according to the True or False
656 // value of aria-checked for 'radio' and 'menuitemradio' roles.
657 Role::RadioButton | Role::MenuItemRadio => self.0.toggled() == Some(Toggled::True),
658 // https://www.w3.org/TR/wai-aria-1.1/#aria-selected
659 // SelectionItem.IsSelected is set according to the True or False
660 // value of aria-selected.
661 _ => self.0.is_selected().unwrap_or(false),
662 }
663 }
664
665 fn position_in_set(&self) -> Option<i32> {
666 self.0

Callers 10

node_addedMethod · 0.45
node_updatedMethod · 0.45
set_selectedMethod · 0.45
traitsMethod · 0.45
node_addedMethod · 0.45
node_updatedMethod · 0.45
node_removedMethod · 0.45
valueMethod · 0.45

Calls 2

toggledMethod · 0.80
roleMethod · 0.45

Tested by

no test coverage detected