richerfu 更新 AccessKit 的 OpenHarmony 适配器 PR

richerfu 说明 AccessKit 的 OpenHarmony 适配器 PR 已补充树变化事件、滚动与点击处理、aarch64-unknown-linux-ohos CI、可运行 showcase 示例和构建文档,并另开 accesskit-c 绑定 PR;主 PR 仍为草稿,相关支持尚未合并发布。

作者原文

Thanks for the thorough review! I have updated the PR to address all feedback:

  1. Cargo manifest & MSRV:
  • Inherited rust-version.workspace = true (1.87) and added exclude = ["examples"] in adapters/ohos/Cargo.toml.
  • Re-exported ohos_accessibility_binding (AccessibilityError, Provider, Result) from accesskit_ohos.
  1. Tree change handling & events (TreeChangeHandler):
  • Replaced the no-op change handler with AdapterChangeHandler to emit EventType::Announce for live regions (node_added / node_updated), EventType::TextUpdate, EventType::Selected, EventType::Scrolled, and EventType::FocusNodeUpdate, while still sending EventType::PageContentUpdate on the root node.
  1. Actions & node properties:
  • Mapped ActionType::ScrollForward / ActionType::ScrollBackward to Action::Increment / Action::Decrement when supported, and passed ActionData::ScrollUnit(ScrollUnit::Page) for scroll actions.
  • Added Click-to-Focus fallback for focusable nodes that do not explicitly support Action::Click, and emitted EventType::Clicked after click actions.
  1. CI & accesskit-c bindings:
  • Added aarch64-unknown-linux-ohos to cargo-deny, clippy, doc, and test in .github/workflows/ci.yml.
  • Opened the companion C bindings PR at https://github.com/AccessKit/accesskit-c/pull/117.
  1. Runnable showcase example & documentation:
  • Added adapters/ohos/examples/showcase.rs (built on example_common) and the host DevEco Studio / Hvigor project in adapters/ohos/examples/showcase_app/.

OpenHarmony / HarmonyOS Development & Testing Guide

  • Official documentation & IDE: The overall HarmonyOS / OpenHarmony development documentation is available at https://developer.huawei.com/consumer/en/doc/harmonyos-guides/start-overview. For local development and compilation, you can download DevEco Studio from the official website, which bundles the OpenHarmony SDK, NDK, hvigorw, hdc, and an official emulator.
  • Emulator & accessibility testing (ohos-qemu): Note that the official DevEco Studio emulator does not currently support the accessibility subsystem. If you want to run and verify the end-to-end accessibility workflow without a physical device, you can use the OpenHarmony QEMU images I maintain at https://github.com/harmony-contrib/ohos-qemu.
  • Build, HAP signing, and QEMU usage: Full instructions for building showcase, packaging and signing the .hap (including CLI signing via hapsigner), and installing/verifying the accessibility tree on ohos-qemu are documented in adapters/ohos/README.md.