Conversation
DataTriny
left a comment
There was a problem hiding this comment.
Hi @amerikrainian, thanks for that. Looks good already. Just a few requests to align with Chromium.
|
I've modified your example here to set Tested on Windows 11 with NVDA, the Narrator and JAWS. |
DataTriny
left a comment
There was a problem hiding this comment.
Since TreeItem nodes are not considered selection containers, they currently are not able to propagate their size_of_set property to their children. I think size_of_set_from_container needs to be generalized anyway to also work on nested lists in paragraphs. Here's how I'd do it:
diff --git a/consumer/src/node.rs b/consumer/src/node.rs
index cdd36cf..ff0b06a 100644
--- a/consumer/src/node.rs
+++ b/consumer/src/node.rs
@@ -609,8 +609,15 @@ impl<'a> Node<'a> {
&self,
filter: &impl Fn(&Node) -> FilterResult,
) -> Option<usize> {
- self.selection_container(filter)
- .and_then(|c| c.size_of_set())
+ let mut parent = self.filtered_parent(filter);
+ while let Some(p) = parent {
+ if let Some(size_of_set) = p.size_of_set() {
+ return Some(size_of_set);
+ } else {
+ parent = p.filtered_parent(filter);
+ }
+ }
+ None
}
pub fn size_of_set(&self) -> Option<usize> {
|
Also please don't forget to run |
DataTriny
left a comment
There was a problem hiding this comment.
Congratulation on your first pull request here! Thanks!
As per the title, added the expanded, collapsed, and tree view item announcements for UIA. An example to test this can be found here
Feedback welcome!
Closes #32