Conversation
Previously the LLM received clickables as bare `[N] tag`, named only when an aria-label/alt/title/name/placeholder/value attribute was present. Anchor text, JS click handlers, and icon-only buttons arrived anonymous, leaving the screenshot as the sole disambiguator. - Detection unions the attribute heuristic with CDP's native isClickable set, catching JS-attached listeners, not just markup. - ax_name falls back through: aria/alt/title/name/placeholder -> descendant text -> onclick handler name (humanized, verb only) -> FontAwesome icon class -> role. - role overrides the displayed tag, so <i role="button"> renders as button. - clickable_map: raise cap 80 -> 200 and sort visible-first so on-screen elements survive truncation. - Split snapshot_parser into snapshot_parser/clickables/clickable_naming to satisfy the 200-LOC module cap. Verified live against headless Chrome via the new (ignored) e2e test clickable_names_resolve_text_onclick_icon_and_role. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
feat(dom): name clickables from text, onclick, icon class, role + bump 3.1.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Promote v3.1.0 to main. Tagging
v3.1.0after merge triggers the release build and crates.io publish (minor bump satisfies the publish gate).Includes #51: clickable elements now named from descendant text, onclick handlers, FontAwesome icon classes, and role; CDP-native clickable detection; cap 80→200 with visible-first truncation.
🤖 Generated with Claude Code