Accessibility inspect returns far-offscreen elements, blowing the budget on long pages
維護者通常 1 天內回覆
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 48/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- macos, swift
- 領域
- accessibility, desktop
研究方向
Start by reading the accessibility inspection implementation and how it applies scope and element budgets; the issue does not name specific files or tests. Compare the returned element bounds with the window’s visible rectangle and check how truncation selects elements. Done means inspection can prioritize or limit offscreen elements so visible, actionable elements survive truncation.
由索引模型根據 Issue 內容生成。
描述
What happened
Inspecting a Safari window showing Proton VPN's WireGuard config page returned
~25k tokens and was truncated ("truncated": true, "omitted": 964), dropping
elements the agent needed. The page has a 240-country server list below the
form.
The output includes a large number of elements that are nowhere near the
visible window (window is 1298x953):
{"id":"elem_52", "label":"Downloads", "bounds":[337,-739,949,51]}
{"id":"elem_60", "label":"Download Android", "bounds":[384,-379,85,30]}
{"id":"elem_88", "label":"form", "bounds":[337,96,949,7117]}
{"id":"elem_520","label":"Eritrea Eritrea 1 city", "bounds":[337,2733,949,41]}
Elements at y=-739 and y=2733 on a 953pt-tall window can't be acted on
without scrolling first, but they consume the element budget ahead of elements
that are actually visible.
scope doesn't help here
The documented workaround is to scope to a container, but the only container
that holds the form (elem_88, the form group) also contains the whole
country list — its bounds are 7117pt tall. Scoping returned the same
truncation.
Suggestion
Add a way to limit inspection to what's actionable:
- a
visible_onlyflag that drops elements whose bounds don't intersect the
window's visible rect, or - a
max_depth, or - spend the element budget on intersecting elements first, so truncation drops
offscreen content rather than visible content.
For an agent driving a page, offscreen elements are close to useless: any
action on them is refused until scrolled into view anyway.
Workaround used
mode: pixels + point clicks, which is cheap but gives up element targeting
and can't do text insertion.
Environment
Desktop Tools 0.16.1, macOS 27, Safari 27
- 主要語言
- Swift
- 星號
- 0
- 分支
- 0
- 平均合併
- 39 分鐘
- 30 天內合併 PR
- 162
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
githubnext/desktop-tools 的其他 Issue
-
難度 5/5 一週以上 新手友好度 15/100
githubnext/desktop-tools#143 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 42/100
githubnext/desktop-tools#129 ·
維護者通常 1 天內回覆
-
enhancement
難度 5/5 一週以上 新手友好度 8/100
githubnext/desktop-tools#5 · 11 則留言 ·
維護者通常 1 天內回覆
查看 githubnext/desktop-tools 的全部 Issue
相似的 Issue
-
難度 1/5 1 小時以內 新手友好度 85/100
521xueweihan/HelloGitHub#4101 ·
-
難度 1/5 1 小時以內 新手友好度 85/100
element-hq/element-x-ios#6405 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
apple/coreai-models#380 ·
維護者通常 1 天內回覆
-
Bug 🐞
難度 2/5 1-3 小時 新手友好度 66/100
mozilla-mobile/firefox-ios#36278 ·
維護者通常 1 天內回覆
-
product / auth product / console product / sites product / storage
難度 1/5 1 小時以內 新手友好度 84/100
維護者通常 1 天內回覆