(&self)
| 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 |
no test coverage detected