ax-grep 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 hmmhmmhm
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,157 +1,108 @@
1
+ <div align="center">
2
+
1
3
  # ax-grep
2
4
 
3
- `ax-grep` extracts a semantic accessibility-like tree from HTML or from a live
4
- web page. It is designed for agents, browser extensions, injected scripts, and
5
- WebView bridges that need a compact, inspectable view of page structure.
5
+ [![npm version](https://img.shields.io/npm/v/ax-grep.svg)](https://www.npmjs.com/package/ax-grep)
6
+ [![coverage: 100%](https://img.shields.io/badge/coverage-100%25-brightgreen.svg)](./tests)
7
+ [![license: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
8
+ [![agent ready](https://img.shields.io/badge/agent-ready-0b7f3a.svg)](./docs/agent-handoff.md)
9
+ [![Codex skill](https://img.shields.io/badge/Codex-skill-111111.svg)](./skills/ax-grep-cli/SKILL.md)
10
+ [![Claude compatible](https://img.shields.io/badge/Claude-compatible-5b4b8a.svg)](./docs/cli-agent.md)
11
+ [![Gemini ready](https://img.shields.io/badge/Gemini-ready-1a73e8.svg)](./docs/cli-agent.md)
6
12
 
7
- It is not a replacement for a real browser accessibility tree. It approximates
8
- one from DOM, ARIA, computed style, labels, focusability, and element state.
13
+ <img src="./docs/assets/ax-grep-og.png" alt="ax-grep promo image" width="920">
9
14
 
10
- ## Install
15
+ <img src="./docs/assets/ax-grep-benchmark.png" alt="ax-grep benchmark comparison image" width="920">
11
16
 
12
- ```sh
13
- pnpm add ax-grep
14
- ```
17
+ <img src="./docs/assets/ax-grep-search.png" alt="ax-grep auto search comparison image" width="920">
15
18
 
16
- ## Which API Should I Use?
19
+ Compact semantic trees and agent-ready page checks from HTML, URLs, WebViews,
20
+ and live browser pages. It approximates browser accessibility trees before
21
+ automation, defaults to `impit` for browser-like HTTP/2/TLS fetches, detects
22
+ major CAPTCHA and bot-challenge markers, saves 15.4x less peak RAM and 3.0x
23
+ fewer decision tokens in the local benchmark, and `--search` auto mode tries
24
+ DuckDuckGo, Bing, StartPage, and Google while recording every engine attempt.
17
25
 
18
- | Situation | Use |
19
- | --- | --- |
20
- | You have an HTML string from `fetch()`, SSR, or a Worker | `extract(html)` from `ax-grep` |
21
- | You control a live page through Puppeteer, Playwright, or a WebView bridge | `createExtractorScript()` from `ax-grep` |
22
- | Your code already runs inside the page, such as a browser extension content script | `extract()` from `ax-grep/browser` |
23
- | You want the explicit Worker-oriented static entry | `extract(html)` from `ax-grep/static` |
26
+ </div>
24
27
 
25
- ## Static HTML
28
+ ## 1. Try With A Prompt
26
29
 
27
- ```ts
28
- import { extract } from "ax-grep";
30
+ Paste this into a Codex session or subagent prompt before opening a browser
31
+ (also works as guidance for Claude, Gemini, OpenRouter, and other agents):
29
32
 
30
- const response = await fetch("https://example.com");
31
- const html = await response.text();
32
- const tree = extract(html);
33
- ```
34
-
35
- Use `ax-grep/static` for the same static extractor as an explicit subpath when
36
- you want the smallest Worker-oriented import.
33
+ ```md
34
+ Before opening a browser, inspect pages with ax-grep when possible.
37
35
 
38
- ## Browser Injection
36
+ Run:
37
+ npx --yes ax-grep@latest <url> --agent-brief
39
38
 
40
- ```ts
41
- import { createExtractorScript } from "ax-grep";
42
-
43
- const tree = await page.evaluate(createExtractorScript());
39
+ Read agent.executor, agent.handoff, agent.readTargets, pageCheck, and
40
+ verification first. Open a browser only when the payload says static HTML is
41
+ not enough.
44
42
  ```
45
43
 
46
- Playwright example:
47
-
48
- ```ts
49
- import { chromium } from "playwright";
50
- import { createExtractorScript, formatSemanticTreeText } from "ax-grep";
51
-
52
- const browser = await chromium.launch();
53
- const page = await browser.newPage();
44
+ ## 2. Install The CLI Skill
54
45
 
55
- await page.goto("https://example.com");
56
-
57
- const tree = await page.evaluate(createExtractorScript({
58
- includeBounds: false,
59
- includeAttributes: false,
60
- }));
61
-
62
- console.log(formatSemanticTreeText(tree));
63
-
64
- await browser.close();
46
+ ```sh
47
+ curl -fsSL https://raw.githubusercontent.com/hmmhmmhm/ax-grep/main/skills.sh | sh
65
48
  ```
66
49
 
67
- WebView-style injection:
50
+ This installs the Codex skill prompt only. The same prompt pattern can be pasted
51
+ into Claude, Gemini, OpenRouter, or other agent runners. Restart Codex if the
52
+ new skill is not listed immediately.
68
53
 
69
- ```ts
70
- import { createExtractorScript } from "ax-grep";
54
+ ## 3. Try The CLI
71
55
 
72
- const script = createExtractorScript({
73
- mode: "interactive",
74
- format: "json",
75
- });
76
-
77
- // Android: webView.evaluateJavascript(script, callback)
78
- // iOS: webView.evaluateJavaScript(script, completionHandler)
56
+ ```sh
57
+ npx --yes ax-grep@latest https://example.com --agent-brief
79
58
  ```
80
59
 
81
- ## Direct In-Page Usage
60
+ If you installed the binary globally, use `ax-grep` directly.
61
+ Agents should read `agent.executor`, `agent.handoff`, `agent.readTargets`,
62
+ `pageCheck`, and `verification` first. Open a browser only when the handoff
63
+ fields say static HTML is not enough.
82
64
 
83
- ```ts
84
- import { extract, formatSemanticTreeText } from "ax-grep/browser";
65
+ ## 4. Use From A Server
85
66
 
86
- const tree = extract({
87
- mode: "interactive",
88
- includeBounds: false,
89
- });
67
+ Use this inside agent services built with Codex SDK, OpenRouter, or similar
68
+ LLM routing stacks to turn fetched HTML into compact source evidence before
69
+ spending tokens or memory on browser automation.
90
70
 
91
- console.log(formatSemanticTreeText(tree));
71
+ ```sh
72
+ npm install ax-grep
92
73
  ```
93
74
 
94
- ## Static SSR HTML
95
-
96
75
  ```ts
97
- import { extract } from "ax-grep/static";
98
- import { formatSemanticTreeText } from "ax-grep";
99
-
100
- export default {
101
- async fetch(request: Request): Promise<Response> {
102
- const url = new URL(request.url).searchParams.get("url");
103
- if (!url) return new Response("Missing url", { status: 400 });
104
-
105
- const response = await fetch(url);
106
- const html = await response.text();
107
- const tree = extract(html);
108
-
109
- return new Response(formatSemanticTreeText(tree), {
110
- headers: { "content-type": "text/plain; charset=utf-8" },
111
- });
112
- },
113
- };
76
+ import { extract, formatSemanticTreeText } from "ax-grep";
77
+
78
+ const html = await fetch("https://example.com").then((r) => r.text());
79
+ const tree = extract(html);
80
+ const promptText = formatSemanticTreeText(tree);
114
81
  ```
115
82
 
116
- Static extraction parses the HTML string directly, so it can infer roles, names,
117
- labels, ARIA state, links, forms, headings, tables, and lists from SSR markup. It
118
- cannot see computed style, layout bounds, client-rendered DOM, shadow DOM, or
119
- iframe contents.
83
+ `ax-grep` is ESM-only and requires Node 18 or newer. CommonJS services can use `const { extract } = await import("ax-grep")`.
120
84
 
121
- By default, static extraction prunes hidden markup and collapsed controlled
122
- regions, skips non-semantic payload tags, summarizes very large child lists, and
123
- collapses repeated template-like subtrees. It also infers broad source profiles
124
- from the HTML, preserving more links for wiki-like pages while tightening dense
125
- link-list summarization for forum-like pages.
85
+ ## 5. Use In WebViews Or Pages
126
86
 
127
- ## Mutation Stream
87
+ In mobile apps, WebViews, and in-page agents, inject the extractor to create an
88
+ accessibility-style structure immediately from the current page. It is useful
89
+ for local sLLM web search, local web parsing, and instant agent-ready page
90
+ summaries without leaving the app.
128
91
 
129
92
  ```ts
130
- import { observeSemanticTree } from "ax-grep/browser";
131
-
132
- const observer = observeSemanticTree((change) => {
133
- console.log(change.mutationCount, change.tree);
134
- }, { debounceMs: 50 });
135
-
136
- observer.disconnect();
137
- ```
138
-
139
- For injected-script use, `createObserverScript()` installs an observer on
140
- `window.__AX_LITE_OBSERVER__` and dispatches `__AX_LITE_OBSERVER__:change`
141
- events.
142
-
143
- ## Benchmarking
93
+ import { createExtractorScript } from "ax-grep";
144
94
 
145
- ```sh
146
- pnpm compare:sample
147
- pnpm compare:static https://example.com https://news.ycombinator.com
148
- pnpm compare:tokens https://example.com https://news.ycombinator.com
149
- pnpm compare:static:korea-social
150
- pnpm compare:tokens:korea-social
151
- pnpm compare:static:china-japan
152
- pnpm compare:tokens:china-japan
95
+ const script = createExtractorScript({ format: "text" });
96
+ const text = await page.evaluate(script);
97
+ // iOS/Android WebView: evaluateJavaScript(script) returns the same text value.
153
98
  ```
154
99
 
155
- The comparison scripts compare `ax-grep` output with `agent-browser snapshot`
156
- output and estimate token cost for compact agent prompts. See
157
- `docs/comparison-baseline.md` for the current baseline run.
100
+ ## Docs
101
+ - [Documentation index](./docs/README.md)
102
+ - [CLI skill prompt](./skills/ax-grep-cli/SKILL.md)
103
+ - [CLI and agent mode](./docs/cli-agent.md)
104
+ - [Agent handoff loop](./docs/agent-handoff.md)
105
+ - [Benchmarks](./docs/benchmarks.md)
106
+ - [Library API](./docs/library-api.md)
107
+ - [Server agent integration](./docs/server-agent.md)
108
+ - [WebView and in-page usage](./docs/webview.md)
package/dist/browser.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as SemanticTreeOptions, S as SemanticNode, f as SemanticTreeChange, g as SemanticTreeObserverOptions } from './types-dgf3brcf.js';
1
+ import { a as SemanticTreeOptions, S as SemanticNode, aE as SemanticTreeChange, aF as SemanticTreeObserverOptions } from './types-K1hqb7Pq.js';
2
2
 
3
3
  declare function extractSemanticTree(options?: SemanticTreeOptions): SemanticNode;
4
4
 
package/dist/browser.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  extractSemanticTree,
3
3
  formatSemanticTreeText,
4
4
  observeSemanticTree
5
- } from "./chunk-U3GDKPLQ.js";
5
+ } from "./chunk-HPZ32BKV.js";
6
6
  export {
7
7
  extractSemanticTree as extract,
8
8
  extractSemanticTree,
File without changes
@@ -132,7 +132,7 @@ function walkElement(element, context) {
132
132
  if (!context.options.includeHidden && isHidden(element)) return null;
133
133
  if (context.options.excludeLikelyAds && isLikelyAd(element)) return null;
134
134
  const role = getRole(element);
135
- const state = getState(element);
135
+ const state = getState(element, context);
136
136
  const focusable = isFocusable(element);
137
137
  const interactive = isInteractive(element, role, focusable);
138
138
  const name = role ? computeName(element, role, context) : "";
@@ -292,10 +292,20 @@ function labelText(element, context) {
292
292
  }
293
293
  return "";
294
294
  }
295
- function getState(element) {
295
+ function getState(element, context) {
296
296
  const state = {};
297
297
  if (isHidden(element)) state.hidden = true;
298
298
  if (isDisabled(element)) state.disabled = true;
299
+ const busy = ariaBoolean(element.getAttribute("aria-busy"));
300
+ if (busy !== void 0) state.busy = busy;
301
+ const multiselectable = ariaBoolean(element.getAttribute("aria-multiselectable"));
302
+ if (multiselectable !== void 0) state.multiselectable = multiselectable;
303
+ const sort = element.getAttribute("aria-sort");
304
+ if (sort) state.sort = normalizeText(sort, 40);
305
+ const grabbed = ariaBoolean(element.getAttribute("aria-grabbed"));
306
+ if (grabbed !== void 0) state.grabbed = grabbed;
307
+ const dropEffect = element.getAttribute("aria-dropeffect");
308
+ if (dropEffect) state.dropEffect = normalizeText(dropEffect, 80);
299
309
  if (element === document.activeElement) state.focused = true;
300
310
  const checked = ariaBooleanOrMixed(element.getAttribute("aria-checked"));
301
311
  if (checked !== void 0) state.checked = checked;
@@ -317,6 +327,25 @@ function getState(element) {
317
327
  if (element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement) {
318
328
  if (element.readOnly) state.readonly = true;
319
329
  }
330
+ const current = element.getAttribute("aria-current");
331
+ if (current && current !== "false") state.current = current === "true" ? true : current;
332
+ const haspopup = element.getAttribute("aria-haspopup");
333
+ if (haspopup && haspopup !== "false") state.haspopup = haspopup === "true" ? true : haspopup;
334
+ const controls = element.getAttribute("aria-controls");
335
+ if (controls) state.controls = normalizeText(controls, context.options.maxTextLength);
336
+ const live = element.getAttribute("aria-live");
337
+ if (live) state.live = normalizeText(live, context.options.maxTextLength);
338
+ if (element.getAttribute("aria-modal") === "true") state.modal = true;
339
+ const orientation = element.getAttribute("aria-orientation");
340
+ if (orientation) state.orientation = normalizeText(orientation, 40);
341
+ const valueMin = ariaNumber(element.getAttribute("aria-valuemin"));
342
+ if (typeof valueMin === "number") state.valueMin = valueMin;
343
+ const valueMax = ariaNumber(element.getAttribute("aria-valuemax"));
344
+ if (typeof valueMax === "number") state.valueMax = valueMax;
345
+ const valueNow = ariaNumber(element.getAttribute("aria-valuenow"));
346
+ if (typeof valueNow === "number") state.valueNow = valueNow;
347
+ const valueText = element.getAttribute("aria-valuetext");
348
+ if (valueText) state.valueText = normalizeText(valueText, context.options.maxTextLength);
320
349
  return state;
321
350
  }
322
351
  function isHidden(element) {
@@ -550,6 +579,11 @@ function ariaBooleanOrMixed(value) {
550
579
  if (value === "mixed") return "mixed";
551
580
  return ariaBoolean(value);
552
581
  }
582
+ function ariaNumber(value) {
583
+ if (value === null || value.trim() === "") return void 0;
584
+ const parsed = Number(value);
585
+ return Number.isFinite(parsed) ? parsed : void 0;
586
+ }
553
587
  function formatState(state) {
554
588
  if (!state) return "";
555
589
  const entries = Object.entries(state).filter(([, value]) => value !== void 0);
@@ -575,4 +609,4 @@ export {
575
609
  formatSemanticTreeText,
576
610
  observeSemanticTree
577
611
  };
578
- //# sourceMappingURL=chunk-U3GDKPLQ.js.map
612
+ //# sourceMappingURL=chunk-HPZ32BKV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/browser.ts"],"sourcesContent":["import type {\n SemanticNode,\n SemanticNodeState,\n SemanticTreeChange,\n SemanticTreeObserverOptions,\n SemanticTreeOptions,\n} from \"./types\";\n\ntype WalkContext = {\n options: Required<SemanticTreeOptions>;\n nextId: number;\n rootDocument: Document;\n};\n\nconst defaultOptions: Required<SemanticTreeOptions> = {\n mode: \"compact\",\n includeBounds: true,\n includeAttributes: true,\n includeTextNodes: true,\n includeHidden: false,\n includeSelectOptions: true,\n excludeLikelyAds: false,\n excludeLikelyBoilerplate: false,\n pruneCustomElementWrappers: true,\n pruneCollapsedSubtrees: true,\n pruneLikelyClosedOverlays: false,\n summarizeLargeSubtrees: false,\n summarizeLikelyLinkFarms: false,\n summarizeRepeatedSubtrees: false,\n maxChildrenPerNode: 80,\n maxLinkFarmChildren: 24,\n maxRepeatedSubtreeInstances: 3,\n maxTextLength: 240,\n};\n\nconst defaultObserverOptions: Required<Pick<SemanticTreeObserverOptions, \"debounceMs\">> = {\n debounceMs: 50,\n};\n\nconst interactiveRoles = new Set([\n \"button\",\n \"checkbox\",\n \"combobox\",\n \"link\",\n \"listbox\",\n \"menuitem\",\n \"menuitemcheckbox\",\n \"menuitemradio\",\n \"option\",\n \"radio\",\n \"searchbox\",\n \"slider\",\n \"spinbutton\",\n \"switch\",\n \"tab\",\n \"textbox\",\n \"treeitem\",\n]);\n\nconst landmarkTags: Record<string, string> = {\n article: \"article\",\n aside: \"complementary\",\n footer: \"contentinfo\",\n form: \"form\",\n header: \"banner\",\n main: \"main\",\n nav: \"navigation\",\n section: \"region\",\n};\n\nconst rolesNamedFromContents = new Set([\n \"button\",\n \"cell\",\n \"checkbox\",\n \"columnheader\",\n \"heading\",\n \"link\",\n \"menuitem\",\n \"menuitemcheckbox\",\n \"menuitemradio\",\n \"option\",\n \"radio\",\n \"rowheader\",\n \"switch\",\n \"tab\",\n \"treeitem\",\n]);\n\nexport function extractSemanticTree(options: SemanticTreeOptions = {}): SemanticNode {\n const rootDocument = document;\n const context: WalkContext = {\n options: { ...defaultOptions, ...options },\n nextId: 1,\n rootDocument,\n };\n\n return (\n walkElement(rootDocument.body ?? rootDocument.documentElement, context) ??\n unavailableNode(context, \"document\", \"Document has no inspectable body\")\n );\n}\n\nexport { extractSemanticTree as extract };\n\nexport function formatSemanticTreeText(node: SemanticNode): string {\n const lines: string[] = [];\n\n function visit(current: SemanticNode, depth: number): void {\n const prefix = \" \".repeat(depth);\n const role = current.role ?? current.tag;\n const marker = current.interactive ? \"[i] \" : \"\";\n const name = current.name ? ` '${current.name}'` : \"\";\n const state = formatState(current.state);\n const unavailable = current.unavailableReason ? ` (${current.unavailableReason})` : \"\";\n lines.push(`${prefix}${marker}${role}${name}${state}${unavailable}`);\n for (const child of current.children) visit(child, depth + 1);\n }\n\n visit(node, 0);\n return lines.join(\"\\n\");\n}\n\nexport function observeSemanticTree(\n onChange: (change: SemanticTreeChange) => void,\n options: SemanticTreeObserverOptions = {},\n): { disconnect: () => void; snapshot: () => SemanticNode } {\n const root = document.documentElement;\n const observerOptions = { ...defaultObserverOptions, ...options };\n let mutationCount = 0;\n let timeoutId: number | undefined;\n\n function snapshot(): SemanticNode {\n return extractSemanticTree(options);\n }\n\n function emit(): void {\n timeoutId = undefined;\n onChange({\n tree: snapshot(),\n changedAt: Date.now(),\n mutationCount,\n });\n mutationCount = 0;\n }\n\n const observer = new MutationObserver((mutations) => {\n mutationCount += mutations.length;\n if (timeoutId !== undefined) window.clearTimeout(timeoutId);\n timeoutId = window.setTimeout(emit, observerOptions.debounceMs);\n });\n\n observer.observe(root, {\n attributes: true,\n characterData: true,\n childList: true,\n subtree: true,\n });\n\n return {\n disconnect() {\n if (timeoutId !== undefined) window.clearTimeout(timeoutId);\n observer.disconnect();\n },\n snapshot,\n };\n}\n\nfunction walkElement(element: Element, context: WalkContext): SemanticNode | null {\n if (!context.options.includeHidden && isHidden(element)) return null;\n if (context.options.excludeLikelyAds && isLikelyAd(element)) return null;\n\n const role = getRole(element);\n const state = getState(element, context);\n const focusable = isFocusable(element);\n const interactive = isInteractive(element, role, focusable);\n const name = role ? computeName(element, role, context) : \"\";\n const description = computeDescription(element, context);\n const tag = element.tagName.toLowerCase();\n const children = collectChildren(element, context);\n\n if (context.options.mode === \"interactive\" && !interactive) {\n return children.length > 0\n ? containerNode(context, tag, children)\n : null;\n }\n\n if (shouldPrune(element, role, name, interactive, children, context)) {\n return children.length === 1 ? children[0] ?? null : containerNode(context, tag, children);\n }\n\n const node: SemanticNode = {\n id: nextId(context),\n tag,\n role,\n name,\n interactive,\n focusable,\n children,\n };\n\n if (description) node.description = description;\n const text = getDirectText(element, context.options.maxTextLength);\n if (text) node.text = text;\n const value = getValue(element);\n if (value) node.value = value;\n if (Object.keys(state).length > 0) node.state = state;\n node.selector = getCssPath(element);\n node.xpath = getXPath(element);\n if (context.options.includeBounds) node.bounds = getBounds(element);\n if (context.options.includeAttributes) node.attributes = getAttributes(element);\n\n appendSpecialChildren(element, node, context);\n appendShadowChildren(element, node, context);\n appendFrameChildren(element, node, context);\n\n return node;\n}\n\nfunction collectChildren(element: Element, context: WalkContext): SemanticNode[] {\n const children: SemanticNode[] = [];\n for (const child of Array.from(element.childNodes)) {\n if (child.nodeType === Node.ELEMENT_NODE) {\n if (!context.options.includeSelectOptions && element instanceof HTMLSelectElement) continue;\n const semanticChild = walkElement(child as Element, context);\n if (semanticChild) children.push(semanticChild);\n continue;\n }\n\n if (context.options.includeTextNodes && child.nodeType === Node.TEXT_NODE) {\n const text = normalizeText(child.textContent ?? \"\", context.options.maxTextLength);\n if (text) {\n children.push({\n id: nextId(context),\n tag: \"#text\",\n role: \"text\",\n name: text,\n text,\n interactive: false,\n focusable: false,\n children: [],\n });\n }\n }\n }\n return children;\n}\n\nfunction shouldPrune(\n element: Element,\n role: string | null,\n name: string,\n interactive: boolean,\n children: SemanticNode[],\n context: WalkContext,\n): boolean {\n if (context.options.mode === \"full\") return false;\n if (role === \"none\" || role === \"presentation\") return true;\n if (interactive) return false;\n if (context.options.pruneCustomElementWrappers && isCustomElement(element)) return children.length > 0;\n if (role && role !== \"generic\") return false;\n if (name) return false;\n if (element.id || element.getAttribute(\"aria-label\") || element.getAttribute(\"aria-labelledby\")) return false;\n return children.length > 0;\n}\n\nfunction getRole(element: Element): string | null {\n const explicit = firstToken(element.getAttribute(\"role\"));\n if (explicit) return explicit;\n\n const tag = element.tagName.toLowerCase();\n if (tag === \"section\" && !hasExplicitNameSource(element)) return null;\n if (tag === \"form\" && !hasExplicitNameSource(element)) return null;\n if (tag in landmarkTags) return landmarkTags[tag] ?? null;\n if (/^h[1-6]$/.test(tag)) return \"heading\";\n\n if (tag === \"a\" || tag === \"area\") return element.hasAttribute(\"href\") ? \"link\" : null;\n if (tag === \"button\") return \"button\";\n if (tag === \"details\") return \"group\";\n if (tag === \"dialog\") return \"dialog\";\n if (tag === \"fieldset\") return \"group\";\n if (tag === \"figure\") return \"figure\";\n if (tag === \"iframe\") return \"iframe\";\n if (tag === \"img\") return hasEmptyAlt(element) ? \"presentation\" : \"img\";\n if (tag === \"li\") return \"listitem\";\n if (tag === \"ol\" || tag === \"ul\") return \"list\";\n if (tag === \"optgroup\") return \"group\";\n if (tag === \"option\") return \"option\";\n if (tag === \"output\") return \"status\";\n if (tag === \"progress\") return \"progressbar\";\n if (tag === \"select\") return element.hasAttribute(\"multiple\") ? \"listbox\" : \"combobox\";\n if (tag === \"summary\") return \"button\";\n if (tag === \"table\") return \"table\";\n if (tag === \"caption\") return \"caption\";\n if (tag === \"tbody\" || tag === \"tfoot\" || tag === \"thead\") return \"rowgroup\";\n if (tag === \"td\") return \"cell\";\n if (tag === \"textarea\") return \"textbox\";\n if (tag === \"th\") return element.getAttribute(\"scope\") === \"row\" ? \"rowheader\" : \"columnheader\";\n if (tag === \"tr\") return \"row\";\n\n if (tag === \"input\") return inputRole(element as HTMLInputElement);\n return null;\n}\n\nfunction inputRole(input: HTMLInputElement): string | null {\n const type = (input.getAttribute(\"type\") || \"text\").toLowerCase();\n if (type === \"button\" || type === \"image\" || type === \"reset\" || type === \"submit\") return \"button\";\n if (type === \"checkbox\") return \"checkbox\";\n if (type === \"email\" || type === \"tel\" || type === \"text\" || type === \"url\") return \"textbox\";\n if (type === \"number\") return \"spinbutton\";\n if (type === \"radio\") return \"radio\";\n if (type === \"range\") return \"slider\";\n if (type === \"search\") return \"searchbox\";\n if (type === \"hidden\") return null;\n return \"textbox\";\n}\n\nfunction computeName(element: Element, role: string, context: WalkContext): string {\n if (element.getAttribute(\"aria-labelledby\")) {\n const labelled = textFromIds(element.getAttribute(\"aria-labelledby\") ?? \"\", context.rootDocument);\n if (labelled) return labelled;\n }\n\n const ariaLabel = element.getAttribute(\"aria-label\");\n if (ariaLabel) return normalizeText(ariaLabel, context.options.maxTextLength);\n\n if (element instanceof HTMLInputElement && isButtonLikeInput(element)) {\n return normalizeText(element.value || element.getAttribute(\"value\") || inputFallbackName(element), context.options.maxTextLength);\n }\n\n if (element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement || element instanceof HTMLSelectElement) {\n const label = labelText(element, context);\n if (label) return label;\n const placeholder = element.getAttribute(\"placeholder\");\n if (placeholder) return normalizeText(placeholder, context.options.maxTextLength);\n }\n\n if (element instanceof HTMLImageElement) {\n return normalizeText(element.alt || element.getAttribute(\"title\") || \"\", context.options.maxTextLength);\n }\n\n if (element instanceof HTMLFieldSetElement) {\n const legend = element.querySelector(\":scope > legend\");\n if (legend) return getVisibleText(legend, context.options.maxTextLength);\n }\n\n if (rolesNamedFromContents.has(role)) {\n const ownText = getVisibleText(element, context.options.maxTextLength);\n if (ownText) return ownText;\n }\n\n return normalizeText(element.getAttribute(\"title\") ?? \"\", context.options.maxTextLength);\n}\n\nfunction computeDescription(element: Element, context: WalkContext): string {\n const describedBy = element.getAttribute(\"aria-describedby\");\n if (describedBy) return textFromIds(describedBy, context.rootDocument);\n return normalizeText(element.getAttribute(\"title\") ?? \"\", context.options.maxTextLength);\n}\n\nfunction labelText(\n element: HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement,\n context: WalkContext,\n): string {\n if (element.labels && element.labels.length > 0) {\n return normalizeText(Array.from(element.labels).map((label) => getVisibleText(label, context.options.maxTextLength)).join(\" \"), context.options.maxTextLength);\n }\n return \"\";\n}\n\nfunction getState(element: Element, context: WalkContext): SemanticNodeState {\n const state: SemanticNodeState = {};\n if (isHidden(element)) state.hidden = true;\n if (isDisabled(element)) state.disabled = true;\n const busy = ariaBoolean(element.getAttribute(\"aria-busy\"));\n if (busy !== undefined) state.busy = busy;\n const multiselectable = ariaBoolean(element.getAttribute(\"aria-multiselectable\"));\n if (multiselectable !== undefined) state.multiselectable = multiselectable;\n const sort = element.getAttribute(\"aria-sort\");\n if (sort) state.sort = normalizeText(sort, 40);\n const grabbed = ariaBoolean(element.getAttribute(\"aria-grabbed\"));\n if (grabbed !== undefined) state.grabbed = grabbed;\n const dropEffect = element.getAttribute(\"aria-dropeffect\");\n if (dropEffect) state.dropEffect = normalizeText(dropEffect, 80);\n if (element === document.activeElement) state.focused = true;\n\n const checked = ariaBooleanOrMixed(element.getAttribute(\"aria-checked\"));\n if (checked !== undefined) state.checked = checked;\n else if (element instanceof HTMLInputElement && (element.type === \"checkbox\" || element.type === \"radio\")) {\n state.checked = element.checked;\n }\n\n const selected = ariaBoolean(element.getAttribute(\"aria-selected\"));\n if (selected !== undefined) state.selected = selected;\n else if (element instanceof HTMLOptionElement) state.selected = element.selected;\n\n const expanded = ariaBoolean(element.getAttribute(\"aria-expanded\"));\n if (expanded !== undefined) state.expanded = expanded;\n\n const pressed = ariaBooleanOrMixed(element.getAttribute(\"aria-pressed\"));\n if (pressed !== undefined) state.pressed = pressed;\n\n const required = ariaBoolean(element.getAttribute(\"aria-required\"));\n if (required !== undefined) state.required = required;\n else if (\"required\" in element && Boolean((element as HTMLInputElement).required)) state.required = true;\n\n const invalid = element.getAttribute(\"aria-invalid\");\n if (invalid && invalid !== \"false\") state.invalid = invalid === \"true\" ? true : invalid;\n\n if (element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement) {\n if (element.readOnly) state.readonly = true;\n }\n\n const current = element.getAttribute(\"aria-current\");\n if (current && current !== \"false\") state.current = current === \"true\" ? true : current;\n\n const haspopup = element.getAttribute(\"aria-haspopup\");\n if (haspopup && haspopup !== \"false\") state.haspopup = haspopup === \"true\" ? true : haspopup;\n\n const controls = element.getAttribute(\"aria-controls\");\n if (controls) state.controls = normalizeText(controls, context.options.maxTextLength);\n\n const live = element.getAttribute(\"aria-live\");\n if (live) state.live = normalizeText(live, context.options.maxTextLength);\n\n if (element.getAttribute(\"aria-modal\") === \"true\") state.modal = true;\n\n const orientation = element.getAttribute(\"aria-orientation\");\n if (orientation) state.orientation = normalizeText(orientation, 40);\n\n const valueMin = ariaNumber(element.getAttribute(\"aria-valuemin\"));\n if (typeof valueMin === \"number\") state.valueMin = valueMin;\n const valueMax = ariaNumber(element.getAttribute(\"aria-valuemax\"));\n if (typeof valueMax === \"number\") state.valueMax = valueMax;\n const valueNow = ariaNumber(element.getAttribute(\"aria-valuenow\"));\n if (typeof valueNow === \"number\") state.valueNow = valueNow;\n const valueText = element.getAttribute(\"aria-valuetext\");\n if (valueText) state.valueText = normalizeText(valueText, context.options.maxTextLength);\n\n return state;\n}\n\nfunction isHidden(element: Element): boolean {\n if (element.hasAttribute(\"hidden\")) return true;\n if (element.getAttribute(\"aria-hidden\") === \"true\") return true;\n\n const style = getComputedStyle(element);\n if (\n style.display === \"none\" ||\n style.visibility === \"hidden\" ||\n style.contentVisibility === \"hidden\"\n ) return true;\n if (Number(style.opacity) === 0) return true;\n return false;\n}\n\nfunction isLikelyAd(element: Element): boolean {\n const haystack = [\n element.id,\n element.getAttribute(\"class\"),\n element.getAttribute(\"aria-label\"),\n element.getAttribute(\"data-testid\"),\n element.getAttribute(\"data-test-id\"),\n element.getAttribute(\"data-name\"),\n ].filter(Boolean).join(\" \").toLowerCase();\n if (/\\b(ad|ads|advert|advertisement|sponsor|sponsored|placement)\\b/.test(haystack)) return true;\n if (element instanceof HTMLAnchorElement && normalizeText(element.textContent ?? \"\", 80).toLowerCase() === \"ad\") return true;\n return false;\n}\n\nfunction isDisabled(element: Element): boolean {\n if (element.getAttribute(\"aria-disabled\") === \"true\") return true;\n return \"disabled\" in element && Boolean((element as HTMLButtonElement).disabled);\n}\n\nfunction isFocusable(element: Element): boolean {\n if (isDisabled(element) || isHidden(element)) return false;\n const tabindex = element.getAttribute(\"tabindex\");\n if (tabindex !== null) return Number(tabindex) >= 0;\n return element.matches(\"a[href],area[href],button,input,select,textarea,summary,iframe,[contenteditable=''],[contenteditable='true']\");\n}\n\nfunction isInteractive(element: Element, role: string | null, focusable: boolean): boolean {\n if (role && interactiveRoles.has(role)) return true;\n if (element.matches(\"a[href],button,input,select,textarea,summary,option\")) return true;\n if (element.hasAttribute(\"onclick\")) return true;\n return focusable && Boolean(role);\n}\n\nfunction appendSpecialChildren(element: Element, node: SemanticNode, context: WalkContext): void {\n if (!context.options.includeSelectOptions) return;\n if (element instanceof HTMLSelectElement) {\n for (const option of Array.from(element.options)) {\n node.children.push({\n id: nextId(context),\n tag: \"option\",\n role: \"option\",\n name: normalizeText(option.textContent ?? \"\", context.options.maxTextLength),\n value: option.value,\n state: { selected: option.selected, disabled: option.disabled },\n interactive: false,\n focusable: false,\n selector: getCssPath(option),\n xpath: getXPath(option),\n children: [],\n });\n }\n }\n}\n\nfunction isCustomElement(element: Element): boolean {\n return element.tagName.includes(\"-\");\n}\n\nfunction appendShadowChildren(element: Element, node: SemanticNode, context: WalkContext): void {\n const shadowRoot = element.shadowRoot;\n if (!shadowRoot) return;\n for (const child of Array.from(shadowRoot.children)) {\n const semanticChild = walkElement(child, context);\n if (semanticChild) node.children.push(semanticChild);\n }\n}\n\nfunction appendFrameChildren(element: Element, node: SemanticNode, context: WalkContext): void {\n if (!(element instanceof HTMLIFrameElement)) return;\n try {\n const frameDocument = element.contentDocument;\n if (!frameDocument?.body) {\n node.children.push(unavailableNode(context, \"iframe\", \"iframe document unavailable\"));\n return;\n }\n const previousDocument = context.rootDocument;\n context.rootDocument = frameDocument;\n const child = walkElement(frameDocument.body, context);\n context.rootDocument = previousDocument;\n if (child) node.children.push(child);\n } catch {\n node.children.push(unavailableNode(context, \"iframe\", \"cross-origin iframe\"));\n }\n}\n\nfunction unavailableNode(context: WalkContext, tag: string, reason: string): SemanticNode {\n return {\n id: nextId(context),\n tag,\n role: null,\n name: \"\",\n interactive: false,\n focusable: false,\n unavailableReason: reason,\n children: [],\n };\n}\n\nfunction containerNode(context: WalkContext, tag: string, children: SemanticNode[]): SemanticNode {\n return {\n id: nextId(context),\n tag,\n role: null,\n name: \"\",\n interactive: false,\n focusable: false,\n children,\n };\n}\n\nfunction getValue(element: Element): string {\n if (element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement || element instanceof HTMLSelectElement) {\n return element.value;\n }\n return normalizeText(element.getAttribute(\"aria-valuetext\") ?? element.getAttribute(\"aria-valuenow\") ?? \"\", 80);\n}\n\nfunction getDirectText(element: Element, maxLength: number): string {\n return normalizeText(\n Array.from(element.childNodes)\n .filter((node) => node.nodeType === Node.TEXT_NODE)\n .map((node) => node.textContent ?? \"\")\n .join(\" \"),\n maxLength,\n );\n}\n\nfunction getVisibleText(element: Element, maxLength: number): string {\n const parts: string[] = [];\n\n function visit(node: Node): void {\n if (node.nodeType === Node.TEXT_NODE) {\n parts.push(node.textContent ?? \"\");\n return;\n }\n\n if (node.nodeType !== Node.ELEMENT_NODE) return;\n const childElement = node as Element;\n if (isHidden(childElement)) return;\n for (const child of Array.from(childElement.childNodes)) visit(child);\n }\n\n visit(element);\n return normalizeText(parts.join(\" \"), maxLength);\n}\n\nfunction getAttributes(element: Element): Record<string, string> {\n const attributes: Record<string, string> = {};\n for (const attribute of Array.from(element.attributes)) {\n if (\n attribute.name === \"id\" ||\n attribute.name === \"href\" ||\n attribute.name === \"type\" ||\n attribute.name === \"role\" ||\n attribute.name === \"alt\" ||\n attribute.name === \"title\" ||\n attribute.name.startsWith(\"aria-\") ||\n attribute.name.startsWith(\"data-\")\n ) {\n attributes[attribute.name] = attribute.value;\n }\n }\n return attributes;\n}\n\nfunction getBounds(element: Element) {\n const rect = element.getBoundingClientRect();\n return {\n x: round(rect.x),\n y: round(rect.y),\n width: round(rect.width),\n height: round(rect.height),\n };\n}\n\nfunction getCssPath(element: Element): string {\n if (element.id) return `#${cssEscape(element.id)}`;\n const segments: string[] = [];\n let current: Element | null = element;\n while (current && current.nodeType === Node.ELEMENT_NODE && current !== document.documentElement) {\n const elementAtLevel: Element = current;\n const tag = elementAtLevel.tagName.toLowerCase();\n const parent: Element | null = elementAtLevel.parentElement;\n if (!parent) {\n segments.unshift(tag);\n break;\n }\n const siblings = Array.from(parent.children).filter((child) => child.tagName === elementAtLevel.tagName);\n const index = siblings.indexOf(elementAtLevel) + 1;\n segments.unshift(siblings.length > 1 ? `${tag}:nth-of-type(${index})` : tag);\n current = parent;\n }\n return segments.join(\" > \");\n}\n\nfunction getXPath(element: Element): string {\n const segments: string[] = [];\n let current: Element | null = element;\n while (current && current.nodeType === Node.ELEMENT_NODE) {\n const elementAtLevel: Element = current;\n const tag = elementAtLevel.tagName.toLowerCase();\n const parent: Element | null = elementAtLevel.parentElement;\n if (!parent) {\n segments.unshift(`/${tag}[1]`);\n break;\n }\n const sameTag = Array.from(parent.children).filter((child) => child.tagName === elementAtLevel.tagName);\n segments.unshift(`/${tag}[${sameTag.indexOf(elementAtLevel) + 1}]`);\n current = parent;\n }\n return segments.join(\"\");\n}\n\nfunction textFromIds(ids: string, rootDocument: Document): string {\n return normalizeText(\n ids\n .split(/\\s+/)\n .map((id) => {\n const element = rootDocument.getElementById(id);\n return element ? getVisibleText(element, 240) : \"\";\n })\n .filter(Boolean)\n .join(\" \"),\n 240,\n );\n}\n\nfunction normalizeText(value: string, maxLength: number): string {\n const normalized = value.replace(/\\s+/g, \" \").trim();\n return normalized.length > maxLength ? `${normalized.slice(0, maxLength - 1)}…` : normalized;\n}\n\nfunction firstToken(value: string | null): string | null {\n return value?.trim().split(/\\s+/)[0] || null;\n}\n\nfunction hasExplicitNameSource(element: Element): boolean {\n return Boolean(\n element.getAttribute(\"aria-label\") ||\n element.getAttribute(\"aria-labelledby\") ||\n element.getAttribute(\"title\"),\n );\n}\n\nfunction hasEmptyAlt(element: Element): boolean {\n return element.hasAttribute(\"alt\") && element.getAttribute(\"alt\") === \"\";\n}\n\nfunction isButtonLikeInput(input: HTMLInputElement): boolean {\n return [\"button\", \"image\", \"reset\", \"submit\"].includes((input.getAttribute(\"type\") || \"\").toLowerCase());\n}\n\nfunction inputFallbackName(input: HTMLInputElement): string {\n const type = (input.getAttribute(\"type\") || \"\").toLowerCase();\n if (type === \"submit\") return \"Submit\";\n if (type === \"reset\") return \"Reset\";\n return \"\";\n}\n\nfunction ariaBoolean(value: string | null): boolean | undefined {\n if (value === \"true\") return true;\n if (value === \"false\") return false;\n return undefined;\n}\n\nfunction ariaBooleanOrMixed(value: string | null): boolean | \"mixed\" | undefined {\n if (value === \"mixed\") return \"mixed\";\n return ariaBoolean(value);\n}\n\nfunction ariaNumber(value: string | null): number | undefined {\n if (value === null || value.trim() === \"\") return undefined;\n const parsed = Number(value);\n return Number.isFinite(parsed) ? parsed : undefined;\n}\n\nfunction formatState(state: SemanticNodeState | undefined): string {\n if (!state) return \"\";\n const entries = Object.entries(state).filter(([, value]) => value !== undefined);\n return entries.length > 0\n ? ` [${entries.map(([key, value]) => `${key}=${String(value)}`).join(\" \")}]`\n : \"\";\n}\n\nfunction nextId(context: WalkContext): string {\n const id = `n${context.nextId}`;\n context.nextId += 1;\n return id;\n}\n\nfunction round(value: number): number {\n return Math.round(value * 100) / 100;\n}\n\nfunction cssEscape(value: string): string {\n if (typeof CSS !== \"undefined\" && typeof CSS.escape === \"function\") {\n return CSS.escape(value);\n }\n return value.replace(/[^a-zA-Z0-9_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