| 265 | } |
| 266 | |
| 267 | fn access( |
| 268 | &self, |
| 269 | path: &mut IdPath, |
| 270 | cx: &mut Context, |
| 271 | nodes: &mut Vec<(accesskit::NodeId, accesskit::Node)>, |
| 272 | ) -> Option<accesskit::NodeId> { |
| 273 | let mut c = 0; |
| 274 | let mut builder = accesskit::NodeBuilder::new(accesskit::Role::List); |
| 275 | let mut children = vec![]; |
| 276 | self.children.foreach_view(&mut |child| { |
| 277 | path.push(c); |
| 278 | if let Some(id) = child.access(path, cx, nodes) { |
| 279 | children.push(id) |
| 280 | } |
| 281 | path.pop(); |
| 282 | c += 1; |
| 283 | }); |
| 284 | builder.set_children(children); |
| 285 | let aid = cx.view_id(path).access_id(); |
| 286 | nodes.push((aid, builder.build())); |
| 287 | Some(aid) |
| 288 | } |
| 289 | } |
| 290 | |
| 291 | impl<VT: ViewTuple, D: StackDirection> Stack<VT, D> { |