From 8d5b6875cf262bf90cc0ec2d13a0327fea664f6e Mon Sep 17 00:00:00 2001 From: David Chang Date: Wed, 10 Jan 2024 23:05:24 +0800 Subject: [PATCH] ver Jan10th a quick introduction to accessibility tree interface --- desktop_env/server/README.md | 65 ++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 desktop_env/server/README.md diff --git a/desktop_env/server/README.md b/desktop_env/server/README.md new file mode 100644 index 0000000..eec1448 --- /dev/null +++ b/desktop_env/server/README.md @@ -0,0 +1,65 @@ + + + + +### About the Converted Accessibility Tree + +For several applications like Firefox or Thunderbird, you should first enable + +```sh +gsettings set org.gnome.desktop.interface toolkit-accessibility true +``` + +to see their accessibility tree. + +#### Example of AT + +An example of a node: + +```xml +
+ 歡迎使用新的 Outlook.com 帳戶 +
+``` + +An example of a tree: + +```xml + + + ... + + ... + +``` + +#### Useful attributes + +1. `name` - shows the name of application, title of window, or name of some + component +2. `attr:class` - somewhat the same role as `class` in HTML +3. `attr:id` - somewhat the same role as `id` in HTML +4. `cp:screencoord` - absolute coordinator on the screen +5. `cp:windowcoord` - relative coordinator in the window +6. `cp:size` - the size + +Also several states like `st:enabled` and `st:visible` can be indicated. A full +state list is available at +. + +#### How to use it in evaluation + +See example `thunderbird/12086550-11c0-466b-b367-1d9e75b3910e.json` and +function `check_accessibility_tree` in `metrics/general.py`. You can use CSS +selector or XPath to reference a target nodes. You can also check its text +contents. + +An example of a CSS selector: + +```css +application[name=Thunderbird] page-tab-list[attr|id=\"tabmail-tabs\"]>page-tab[name=\"About Profiles\"] +``` + +This selector will select the page tab of profile manager in Thunderbird (if open). + +For usage of CSS selector: . For usage of XPath: .